-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
122 lines (107 loc) · 6.27 KB
/
Dockerfile
File metadata and controls
122 lines (107 loc) · 6.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
FROM registry.suse.com/bci/bci-base:15.6 AS fetcher
ARG TARGETARCH
ENV BINS_DIR=/tmp/binaries/darwin
ENV HELM_VERSION=3.17.3
ENV KUBECTL_VERSION=1.33.0
RUN mkdir -p ${BINS_DIR}
RUN curl -s -o helm-v${HELM_VERSION}-darwin-${TARGETARCH}.tar.gz https://get.helm.sh/helm-v${HELM_VERSION}-darwin-${TARGETARCH}.tar.gz \
&& tar -zxvf helm-v${HELM_VERSION}-darwin-${TARGETARCH}.tar.gz \
&& mv darwin-${TARGETARCH}/helm ${BINS_DIR}/helm \
&& curl -LO "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/darwin/${TARGETARCH}/kubectl" \
&& chmod +x ./kubectl \
&& mv kubectl ${BINS_DIR}/kubectl
ENV BINS_DIR=/tmp/binaries/linux
RUN mkdir -p ${BINS_DIR}
RUN curl -s -o helm-v${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://get.helm.sh/helm-v${HELM_VERSION}-linux-${TARGETARCH}.tar.gz \
&& tar -zxvf helm-v${HELM_VERSION}-linux-${TARGETARCH}.tar.gz \
&& mv linux-${TARGETARCH}/helm ${BINS_DIR}/helm \
&& curl -LO "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl" \
&& chmod +x ./kubectl \
&& mv kubectl ${BINS_DIR}/kubectl
ENV BINS_DIR=/tmp/binaries/windows
RUN mkdir -p ${BINS_DIR}
RUN curl -s -o helm-v${HELM_VERSION}-windows-amd64.tar.gz https://get.helm.sh/helm-v${HELM_VERSION}-windows-amd64.tar.gz \
&& tar -zxvf helm-v${HELM_VERSION}-windows-amd64.tar.gz \
&& mv windows-amd64/helm.exe ${BINS_DIR}/helm.exe \
&& curl -LO "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/windows/amd64/kubectl.exe" \
&& mv kubectl.exe ${BINS_DIR}/kubectl.exe
FROM --platform=$BUILDPLATFORM openapitools/openapi-generator-cli:v7.14.0 AS backend-client-generator
COPY ui /ui
WORKDIR /ui
RUN /usr/local/bin/docker-entrypoint.sh generate -g typescript-axios -i https://api.apps.rancher.io/api-docs -o autogenerated/client/backend --model-name-suffix=DTO
FROM --platform=$BUILDPLATFORM dp.apps.rancher.io/containers/nodejs:24-dev AS client-builder
WORKDIR /ui
# cache packages in layer
COPY ui/package.json /ui/package.json
COPY ui/package-lock.json /ui/package-lock.json
RUN --mount=type=cache,target=/usr/src/app/.npm \
npm set cache /usr/src/app/.npm && \
npm ci
# install
COPY ui /ui
COPY --from=backend-client-generator /ui/autogenerated /ui/autogenerated
RUN npm run build
FROM --platform=$BUILDPLATFORM dp.apps.rancher.io/containers/nodejs:24-dev AS backend-builder
WORKDIR /backend
# cache packages in layer
COPY backend/package.json /backend/package.json
COPY backend/package-lock.json /backend/package-lock.json
RUN --mount=type=cache,target=/usr/src/app/.npm \
npm set cache /usr/src/app/.npm && \
npm ci
# install
COPY backend /backend
FROM dp.apps.rancher.io/containers/nodejs:24
ARG RELEASE_VERSION=latest
LABEL org.opencontainers.image.title="SUSE Application Collection" \
org.opencontainers.image.description="Integrate the Application Collection into your development lifecycle" \
org.opencontainers.image.vendor="SUSE LLC" \
com.docker.desktop.extension.api.version="0.3.4" \
com.docker.extension.categories="kubernetes,utility-tools" \
com.docker.desktop.extension.icon="https://raw.githubusercontent.com/rancherlabs/application-collection-extension/refs/heads/main/assets/rancher-logo-cow-blue.svg" \
com.docker.extension.screenshots="[\
{\"alt\":\"Collection\", \"url\":\"https://raw.githubusercontent.com/rancherlabs/application-collection-extension/refs/heads/main/assets/01_collection.png\"}, \
{\"alt\":\"Application details\", \"url\":\"https://raw.githubusercontent.com/rancherlabs/application-collection-extension/refs/heads/main/assets/02_application-details.png\"}, \
{\"alt\":\"Chart values form\", \"url\":\"https://raw.githubusercontent.com/rancherlabs/application-collection-extension/refs/heads/main/assets/03_install-form.png\"}, \
{\"alt\":\"Workloads\", \"url\":\"https://raw.githubusercontent.com/rancherlabs/application-collection-extension/refs/heads/main/assets/04_workloads.png\"}, \
{\"alt\":\"Workload details\", \"url\":\"https://raw.githubusercontent.com/rancherlabs/application-collection-extension/refs/heads/main/assets/05_workload-details.png\"}\
]" \
com.docker.extension.detailed-description="\
Build and run cloud-native applications with SUSE's trusted, curated, and continuously updated application collection.\
<br />\
This extension helps you integrating the Collection into your local development environment by:\
<br />\
<ul>\
<li>Managing the authentication: docker, helm and kubernetes credentials are automatically configured</li>\
<li>Making apps plug&play: installs the workloads with a predefined set of values ready for local deployment</li>\
<li>Helping you stay up-to-date: detects application updates and helps you through the update process</li>\
</ul>\
<br />\
Usage:\
<br />\
<ol>\
<li>Have a target kubernetes cluster configured in your context</li>\
<li>Install the extension</li>\
<li><a href=\"https://docs.apps.rancher.io/get-started/authentication/#create-a-personal-access-token\">Generate an access token</a> and configure the authentication</li>\
<li>Start deploying workloads</li>\
</ol>\
" \
com.docker.extension.publisher-url="https://apps.rancher.io/" \
com.docker.extension.additional-urls="[\
{\"title\":\"Product page\",\"url\":\"https://www.suse.com/products/rancher/application-collection\"},\
{\"title\":\"Web application\",\"url\":\"https://apps.rancher.io\"},\
{\"title\":\"Documentation\",\"url\":\"https://docs.apps.rancher.io/developer-toolkit/desktop-extension\"},\
{\"title\":\"Support\",\"url\":\"https://github.com/rancherlabs/application-collection-extension/discussions\"}\
]" \
com.docker.extension.changelog="See full <a href=\"https://github.com/rancherlabs/application-collection-extension/releases/tag/${RELEASE_VERSION}\">change log</a>."
COPY --from=fetcher /tmp/binaries /binaries
COPY --from=fetcher /tmp/binaries/linux /usr/bin
COPY docker-compose.yaml .
COPY metadata.json .
COPY assets/rancher-logo-cow-blue.svg .
COPY --from=client-builder /ui/build ui
COPY --from=backend-builder /backend backend
WORKDIR /backend
ENV PORT=/run/guest-services/application-collection-extension.sock
USER root
CMD ["./bin/www"]