forked from NelsonDane/auto-rsa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (31 loc) · 834 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
33
34
35
36
37
38
39
40
# Nelson Dane
# Build from python slim image
FROM python:3.12-slim
# Set ENV variables
ENV TZ=America/New_York
ENV DEBIAN_FRONTEND=noninteractive
# Default display to :99
ENV DISPLAY=:99
# Install python, pip, and tzdata
RUN apt-get update && apt-get install -y --no-install-recommends \
chromium \
chromium-driver \
dos2unix \
git \
tzdata \
xvfb \
&& rm -rf /var/lib/apt/lists/*
# Install python dependencies
COPY ./requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
# Install playwright
RUN playwright install firefox && \
playwright install-deps
# CD into app
WORKDIR /app
COPY . .
# Make the entrypoint executable
RUN dos2unix entrypoint.sh && \
chmod +x entrypoint.sh
# Set the entrypoint to our entrypoint.sh
ENTRYPOINT ["/app/entrypoint.sh"]