-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (42 loc) · 2.02 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
50
FROM alpine:3.18
RUN set -x \
&& apk add --update bash findutils mariadb-client gzip bzip2 lz4 xz unzip zip coreutils python3 rsync curl \
&& rm -rf /var/cache/apk/* \
;
# Install Gcloud SDK (required for gsutil workload identity authentication)
ENV \
GCLOUD_VERSION=432.0.0 \
GCLOUD_CHECKSUM=b24ba27d57463e08db859b7941cf4d7c33cb3af5865095639e3e0b2055cbec66
RUN set -x \
&& apk --no-cache add python3 \
&& curl -o /tmp/google-cloud-sdk-${GCLOUD_VERSION}-linux-x86_64.tar.gz -L https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${GCLOUD_VERSION}-linux-x86_64.tar.gz \
&& echo "${GCLOUD_CHECKSUM} google-cloud-sdk-${GCLOUD_VERSION}-linux-x86_64.tar.gz" > /tmp/SHA256SUM \
&& ( cd /tmp; sha256sum -c SHA256SUM || ( echo "Expected $(sha256sum google-cloud-sdk-${GCLOUD_VERSION}-linux-x86_64.tar.gz)"; exit 1; )) \
&& tar -C / -zxvf /tmp/google-cloud-sdk-${GCLOUD_VERSION}-linux-x86_64.tar.gz \
&& /google-cloud-sdk/install.sh --quiet \
&& ln -s /google-cloud-sdk/bin/gcloud /usr/local/bin/ \
&& ln -s /google-cloud-sdk/bin/gsutil /usr/local/bin/ \
&& rm -rf /tmp/* /root/.config/gcloud \
;
# Install AWS CLI
ENV \
PYTHONIOENCODING=UTF-8 \
PYTHONUNBUFFERED=0 \
PAGER=more \
AWS_CLI_VERSION=1.27.141 \
AWS_CLI_CHECKSUM=6fd0b48812f8093b9328600ac86c453d8fce30408456dc78603c18404795e16a
RUN set -x \
&& apk --update add --no-cache ca-certificates wget unzip \
&& cd /tmp \
&& wget -nv https://s3.amazonaws.com/aws-cli/awscli-bundle-${AWS_CLI_VERSION}.zip -O /tmp/awscli-bundle-${AWS_CLI_VERSION}.zip \
&& echo "${AWS_CLI_CHECKSUM} awscli-bundle-${AWS_CLI_VERSION}.zip" > /tmp/SHA256SUM \
&& ( cd /tmp; sha256sum -c SHA256SUM || ( echo "Expected $(sha256sum awscli-bundle-${AWS_CLI_VERSION}.zip)"; exit 1; )) \
&& unzip awscli-bundle-${AWS_CLI_VERSION}.zip \
&& /tmp/awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws \
&& apk del wget unzip \
&& rm -rf /var/cache/apk/* \
&& rm -rf /tmp/* \
;
COPY commands /commands
ENTRYPOINT ["/commands/entry.sh"]
CMD ["default"]