-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
38 lines (29 loc) · 1.23 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
FROM python:3.8-slim as base
RUN apt-get update
# TODO: Revert when Selenium will be needed
# Install chrome wed driver
# RUN apt-get install -y gnupg wget curl unzip --no-install-recommends && \
# wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
# echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list && \
# apt-get update -y && \
# apt-get install -y google-chrome-stable && \
# CHROMEVER=$(google-chrome --product-version | grep -o "[^\.]*\.[^\.]*\.[^\.]*") && \
# DRIVERVER=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROMEVER") && \
# wget -q --continue -P /chromedriver "http://chromedriver.storage.googleapis.com/$DRIVERVER/chromedriver_linux64.zip" && \
# unzip /chromedriver/chromedriver* -d /chromedriver
RUN apt-get install -y \
gcc g++ \
libffi-dev \
libpq-dev \
'^postgresql-client-.+$' \
gettext git make
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
RUN pip install poetry
COPY pyproject.toml poetry.lock ./
RUN poetry config virtualenvs.create false
RUN poetry install
COPY . .
RUN chmod +x docker-entrypoint.sh
CMD ["./docker-entrypoint.sh"]