-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (30 loc) · 1.26 KB
/
Dockerfile
File metadata and controls
39 lines (30 loc) · 1.26 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
ARG PYTHON_VERSION
FROM python:${PYTHON_VERSION}-slim-bookworm
ARG NODE_VERSION
RUN apt-get update && \
apt-get install -y curl ca-certificates
# Install Node.js version 20
RUN echo "https://deb.nodesource.com/setup_${NODE_VERSION}" && \
curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION} | bash -
# Install docker
RUN install -m 0755 -d /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc && \
chmod a+r /etc/apt/keyrings/docker.asc && \
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
# Install apt packages
COPY packages.list .
RUN apt-get update && \
xargs -a packages.list apt-get install -y && \
rm -rf /var/lib/apt/lists/*
# Install necessary Python packages
COPY requirements.txt .
RUN pip install -r requirements.txt
# Install necessary Node.js packages
COPY package.json package-lock.json .
RUN npm install -g $(cat package.json | jq -r '.dependencies | keys | join(" ")')
# Set the working directory to a clean directory
WORKDIR /app
ENTRYPOINT ["/bin/bash", "-c"]