-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-backend-dev
40 lines (31 loc) · 1.27 KB
/
Dockerfile-backend-dev
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
FROM python:3.11-slim-buster
ENV POETRY_VIRTUALENVS_CREATE 0
ENV POETRY_NO_INTERACTION 1
ENV POETRY_HOME "$HOME/.poetry"
ENV PATH="$POETRY_HOME/bin:$PATH"
ENV PYTHONPYCACHEPREFIX /.pycache
ENV DJANGO_SETTINGS_MODULE=settings
# Let all *.pyc files stay within the container, for Python >= 3.8
RUN mkdir -p $PYTHONPYCACHEPREFIX
# Use non-interactive frontend for debconf
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# Install system requirements
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential gettext wget \
libpq-dev zlib1g-dev libjpeg62-turbo-dev \
# E2E dependency
firefox-esr curl \
# pytest-translations dependencies
aspell-en aspell-et aspell-ru && \
rm -rf /var/lib/apt/lists/* \
# E2E dependency
&& curl -L https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-linux64.tar.gz | tar xz -C /usr/local/bin
# Copy Python requirements dir and Install requirements
RUN pip install -U pip setuptools wheel poetry
COPY ["backend/pyproject.toml", "backend/poetry.lock", "/"]
# Install all dependencies from poetry.lock (dev included by default)
RUN poetry install
# Set the default directory where CMD will execute
WORKDIR /app
CMD bash