-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (18 loc) · 738 Bytes
/
Dockerfile
File metadata and controls
25 lines (18 loc) · 738 Bytes
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
# Specify a base image. This comes from Docker Hub.
FROM python:3.12.2-alpine
# ENV sets environment variables in the Docker container.
# PYTHONUNBUFFERED ensures that Python outputs are sent straight to terminal without being buffered.
ENV PYTHONUNBUFFERED=1
RUN apk update && \
apk add --no-cache \
chromium \
chromium-chromedriver && \
rm -rf /var/cache/apk/*
WORKDIR /app
COPY . /app
# Copies the requirements.txt from your local directory to the Docker image.
COPY ./requirements.txt /requirements.txt
# Then run pip install to install all dependencies listed in requirements.txt.
RUN pip install -r /requirements.txt
# Specifies the command to run when the Docker container starts.
CMD ["python3", "root.py"]