-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
60 lines (47 loc) · 1.28 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM python:3.12-slim-bullseye
LABEL authors="wm3ndez"
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
WORKDIR /src
RUN pip install -U pip setuptools wheel
RUN apt update
RUN apt install -y \
gcc \
g++ \
python3-dev \
git \
wget
RUN apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg \
fontconfig \
fonts-ipafont-gothic \
fonts-wqy-zenhei \
fonts-thai-tlwg \
fonts-kacst \
fonts-symbola \
fonts-noto \
fonts-freefont-ttf \
--no-install-recommends
RUN wget --no-verbose -O /tmp/chrome.deb \
https://dl.google.com/linux/deb/pool/main/g/google-chrome-stable/google-chrome-stable_127.0.6533.99-1_amd64.deb \
&& apt install -y /tmp/chrome.deb \
&& rm /tmp/chrome.deb
RUN apt install unzip \
&& apt-get purge --auto-remove -y curl gnupg \
&& apt clean \
&& rm -rf /var/lib/apt
RUN wget https://storage.googleapis.com/chrome-for-testing-public/127.0.6533.99/linux64/chromedriver-linux64.zip \
&& unzip chromedriver-linux64.zip \
&& rm chromedriver-linux64.zip \
&& mv chromedriver-linux64/chromedriver /usr/bin/chromedriver
COPY requirements.txt .
RUN pip install -r requirements.txt
WORKDIR /app
COPY app.py .
COPY html_to_pdf.py .
EXPOSE 5000
# Run the Flask app
CMD ["flask", "run", "--host=0.0.0.0"]