-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (40 loc) · 1.66 KB
/
Copy pathDockerfile
File metadata and controls
44 lines (40 loc) · 1.66 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
FROM alpine:3.13.5
ARG TZ="Asia/Kolkata"
ARG GLIBC_VER=2.32-r0
ARG GET_AWSCLI=https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.0.30.zip
RUN apk add --no-cache openssl \
openssh-client \
tzdata \
vim \
less \
curl \
bash \
jq \
zip \
unzip \
git \
ca-certificates \
make \
binutils
# Patch GLIBC
RUN curl -sL https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub && \
curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-${GLIBC_VER}.apk && \
curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk && \
curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk && \
apk add --no-cache glibc-${GLIBC_VER}.apk glibc-bin-${GLIBC_VER}.apk glibc-i18n-${GLIBC_VER}.apk
RUN curl -sL ${GET_AWSCLI} -o awscliv2.zip && \
unzip awscliv2.zip && \
aws/install
#clean up
RUN rm -rf \
awscliv2.zip \
aws \
/usr/local/aws-cli/v2/*/dist/awscli/data/ac.index \
/usr/local/aws-cli/v2/*/dist/awscli/examples \
glibc-${GLIBC_VER}.apk \
glibc-bin-${GLIBC_VER}.apk && \
cp /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
apk upgrade --purge && \
rm -rf /var/cache/apk/*
ENTRYPOINT [ "/usr/local/bin/aws" ]