-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
71 lines (50 loc) · 1.92 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
61
62
63
64
65
66
67
68
69
70
71
FROM nikolaik/python-nodejs:python3.12-nodejs18-slim AS builder
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
RUN apt-get update \
&& apt-get install -y --no-install-recommends xvfb build-essential libpq-dev postgresql-client curl \
wget \
gnupg2 \
lsof \
apt-transport-https \
ca-certificates \
x11-utils xdg-utils xauth \
software-properties-common \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
RUN apt-get update && apt-get install -y google-chrome-stable \
&& rm -rf /var/lib/apt/lists/*
ENV CHROME_BIN=/usr/bin/google-chrome
RUN pip install poetry
WORKDIR /app
COPY pyproject.toml poetry.lock ./
RUN poetry config virtualenvs.create false \
&& poetry install --no-root --no-interaction --no-ansi
FROM nikolaik/python-nodejs:python3.12-nodejs18-slim
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
RUN apt-get update \
&& apt-get install -y --no-install-recommends xvfb xauth build-essential libpq-dev postgresql-client curl \
wget \
gnupg2 \
lsof \
apt-transport-https \
ca-certificates \
x11-utils xdg-utils \
software-properties-common \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
RUN apt-get update && apt-get install -y google-chrome-stable \
&& rm -rf /var/lib/apt/lists/*
ENV CHROME_BIN=/usr/bin/google-chrome
COPY --from=builder /usr/local /usr/local
WORKDIR /app
COPY . .
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 8000
ENTRYPOINT ["/entrypoint.sh"]