-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (34 loc) · 1.47 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
42
43
44
45
46
47
48
49
FROM cookielab/slim:12.0 AS build
ARG TARGETARCH
WORKDIR /tmp
RUN apt update && apt install -y curl zip
ARG KUBECTL_VERSION
RUN curl -L "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl" -o /usr/local/bin/kubectl
RUN chmod +x /usr/local/bin/kubectl
ARG HELM_VERSION
RUN curl -L "https://get.helm.sh/helm-v${HELM_VERSION}-linux-${TARGETARCH}.tar.gz" -o /tmp/helm.tar.gz
RUN tar -xzf /tmp/helm.tar.gz
RUN rm /tmp/helm.tar.gz
RUN mv /tmp/linux-${TARGETARCH}/helm /usr/local/bin/helm
RUN chmod +x /usr/local/bin/helm
ARG SENTRY_CLI_VERSION
RUN curl -sL https://sentry.io/get-cli/ | INSTALL_DIR="/usr/local/bin" sh
ARG AWS_CLI_VERSION
COPY build-scripts/download-aws-cli.sh /tmp/download-aws-cli.sh
RUN /tmp/download-aws-cli.sh
COPY scripts/assume-role.sh /usr/local/bin/assume-role
COPY scripts/deploy-s3-cf.sh /usr/local/bin/deploy-s3-cf
FROM cookielab/container-image-tools:1.4.0-aws AS container-image-tools
FROM cookielab/slim:12.0
RUN apt update && apt install -y curl jq skopeo git gettext-base procps zip \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
COPY --from=build /usr/local/bin /usr/local/bin
COPY --from=build /tmp/aws /tmp/aws
RUN /tmp/aws/install
RUN rm -rf /tmp/aws
RUN mkdir ~/.docker
COPY --from=container-image-tools /container-image-tools/bin/docker-* /usr/local/bin/
COPY --from=container-image-tools /etc/containers/policy.json /etc/containers/policy.json
COPY registries.conf /etc/containers/registries.conf
USER 1987
ONBUILD USER root