-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile2
More file actions
29 lines (22 loc) · 1.06 KB
/
Dockerfile2
File metadata and controls
29 lines (22 loc) · 1.06 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
FROM python:3.9-slim-bullseye
ENV DEBIAN_FRONTEND=noninteractive
# Get Node.js v20
RUN apt-get update; apt-get install curl gpg -y; \
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_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list; \
apt-get update && apt-get install -y nodejs;
# Check versions
RUN node -v && npm -v && python --version
# Install @puppeteer/browsers
RUN npm i -g @puppeteer/browsers; \
mkdir chrome; \
cd chrome; \
npx @puppeteer/browsers install chrome@stable; \
npx @puppeteer/browsers install chromedriver@stable
# Symbolic links
RUN ln -s /chrome/chrome/*/chrome-linux64/chrome /usr/bin/google-chrome && \
ln -s /chrome/chromedriver/*/chromedriver-linux64/chromedriver /usr/bin/chromedriver
COPY requirements.txt /usr/local/tmp/
RUN pip install -r /usr/local/tmp/requirements.txt \
&& rm -fr /usr/local/tmp