-
Notifications
You must be signed in to change notification settings - Fork 56
/
Dockerfile
46 lines (41 loc) · 1.11 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
# Arguments
ARG NODE_ALPINE_IMAGE
FROM $NODE_ALPINE_IMAGE
# SERVERLESS_VERSION is set explicitly in the Makefile used to build, otherwise
# use latest version.
ARG SERVERLESS_VERSION=latest
ENV SERVERLESS_VERSION $SERVERLESS_VERSION
# Install dependencies
RUN apk --no-cache add \
python3 \
python3-dev \
py-pip \
poetry \
aws-cli \
ca-certificates \
groff \
less \
bash \
make \
cmake \
jq \
curl \
wget \
g++ \
zip \
git \
openssh && \
update-ca-certificates
# Install glibc for alpine
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
wget -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.34-r0/glibc-2.34-r0.apk && \
apk add --force-overwrite glibc-2.34-r0.apk && \
rm -f glibc-2.34-r0.apk
# Enable Corepack and set Yarn to Berry version and install Serverless
RUN npm install -g corepack && \
corepack enable && \
yarn set version berry && \
yarn --version && \
npm install -g serverless@$SERVERLESS_VERSION && \
serverless --version
WORKDIR /opt/app