-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile.v2
48 lines (42 loc) · 1.6 KB
/
Dockerfile.v2
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
FROM node:lts-alpine
LABEL maintainer="robertd"
ENV AWSCDK_VERSION=2.128.0
ENV GLIBC_VER=2.34-r0
# override aws-cli v2 default pager
ENV AWS_PAGER=""
# RUN apk update && apk upgrade
RUN apk add --no-cache --update python3 python3-dev git jq
#pip3 needs to be run initialy to upgrade pip
RUN python3 -m ensurepip
RUN pip3 install --upgrade pip
RUN pip3 install boto3 \
json-spec \
yamllint
# https://github.com/aws/aws-cli/issues/4685#issuecomment-615872019
# install glibc compatibility for alpine
RUN apk --no-cache add \
binutils \
curl \
&& 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 \
&& apk add --force-overwrite --no-cache \
glibc-${GLIBC_VER}.apk \
glibc-bin-${GLIBC_VER}.apk \
&& curl -sL https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip \
&& unzip awscliv2.zip \
&& aws/install \
&& rm -rf \
awscliv2.zip \
aws \
/usr/local/aws-cli/v2/*/dist/aws_completer \
/usr/local/aws-cli/v2/*/dist/awscli/data/ac.index \
/usr/local/aws-cli/v2/*/dist/awscli/examples \
&& apk --no-cache del \
binutils \
curl \
&& rm glibc-${GLIBC_VER}.apk \
&& rm glibc-bin-${GLIBC_VER}.apk \
&& rm -rf /var/cache/apk/*
RUN npm i --location=global npm
RUN npm i --location=global aws-cdk@${AWSCDK_VERSION}