-
Notifications
You must be signed in to change notification settings - Fork 29
/
Dockerfile
41 lines (34 loc) · 1.48 KB
/
Dockerfile
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
ARG BASE_IMAGE=europe-docker.pkg.dev/gardener-project/releases/cicd/job-image-base:0.104.0
FROM $BASE_IMAGE AS builder
COPY VERSION /metadata/VERSION
COPY . /cc/utils/
RUN cat /cc/utils/gardener-cicd-libs.apk-packages \
| xargs apk add --no-cache \
&& pip3 install --root /pkgs --upgrade --no-cache-dir \
wheel \
&& pip3 install --root /pkgs --upgrade --no-cache-dir \
--find-links /cc/utils/dist \
gardener-cicd-libs==$(cat /metadata/VERSION) \
gardener-cicd-cli==$(cat /metadata/VERSION) \
pycryptodome
FROM ghcr.io/open-component-model/ocm/ocm.software/ocmcli/ocmcli-image:0.18.0 AS ocm-cli
FROM $BASE_IMAGE
ARG TARGETARCH
COPY --from=builder /pkgs/usr /usr
COPY --from=ocm-cli /bin/ocm /bin/ocm
COPY --from=builder /cc/utils/bin/component-cli /bin/component-cli
COPY --from=builder /usr/lib/libmagic.so.1 /usr/lib/libmagic.so.1
COPY --from=builder /usr/lib/libmagic.so.1.0.0 /usr/lib/libmagic.so.1.0.0
COPY --from=builder /usr/share/misc/magic.mgc /usr/share/misc/magic.mgc
# path is hardcoded in our trait
COPY --from=builder /cc/utils/bin/launch-dockerd.sh /cc/utils/bin/launch-dockerd.sh
ENV PATH=$PATH:/cc/utils/bin
# place version file into container's filesystem to make it easier to
# determine the image version during runtime
COPY VERSION /metadata/VERSION
ENV HELM_V3_VERSION=v3.12.2
ENV HELM_ARCH="${TARGETARCH}"
# copy to where helm is expected
COPY --from=builder /cc/utils/bin/helm /usr/local/bin/helm
# backwards-compatibility
RUN ln -sf /usr/local/bin/helm /usr/local/bin/helm3