-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (37 loc) · 849 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
41
42
43
44
45
FROM python:3.8-slim-buster
# Install dependencies
RUN apt-get update && apt-get install -y \
chromium \
chromium-driver \
libglib2.0-0 \
libnss3 \
libx11-6 \
libx11-xcb1 \
libxcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxi6 \
libxrandr2 \
libxrender1 \
libxss1 \
libxtst6 \
xdg-utils \
pandoc \
fonts-noto-cjk \
&& rm -rf /var/lib/apt/lists/*
# Set environment variables
ENV CHROME_BIN=/usr/bin/chromium-browser
ENV CHROME_PATH=/usr/lib/chromium/
ARG CONTAINER_VERSION
ENV CONTAINER_VERSION ${CONTAINER_VERSION}
WORKDIR /app
# Copy requirements and install them
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
# Copy the application code
COPY . .
# Expose port 5000
EXPOSE 5000
# Run the application
CMD ["python3", "app.py"]