forked from StanGirard/Serverless-Docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (24 loc) · 1017 Bytes
/
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
FROM python:3.12.0-slim-bookworm
ARG SERVERLESS_RELEASE
ARG NODE_MAJOR
LABEL maintainer="StanGirard <[email protected]>"
## Install required packages
RUN apt update && \
apt install -y curl unzip gnupg ca-certificates
## Install AWS Cli
RUN curl --silent --show-error --fail "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install
# Install node.js and yarn
RUN mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" \
> /etc/apt/sources.list.d/nodesource.list && \
apt update && \
apt install -y nodejs npm
# Install serverless cli and compose
RUN npm install -g serverless@${SERVERLESS_RELEASE} && \
npm install -g @serverless/compose
COPY bin/startup.sh .
RUN "./startup.sh"