-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (24 loc) · 945 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
FROM python:3.9-alpine
ENV PYTHONUNBUFFERED 1
ENV POETRY_VIRTUALENVS_CREATE=false
ENV PATH="${PATH}:/root/.poetry/bin"
EXPOSE 8000/tcp
RUN mkdir /app
WORKDIR /app/
RUN apk add --no-cache --virtual build-deps \
curl `# для установки poetry` \
make gcc g++ `# для сборки пакетов` \
postgresql-dev `# для psycopg2` \
libjpeg-turbo-dev zlib-dev libffi-dev cairo-dev libwebp-dev `# для pillow`
RUN apk add --no-cache \
git `# для установки зависимостей из git` \
libpq `# для psycopg2` \
libjpeg-turbo zlib libffi cairo libwebp `# для pillow`
COPY poetry.lock pyproject.toml /app/
RUN pip install --no-cache-dir cryptography==2.1.4
RUN pip3 install poetry
RUN poetry config virtualenvs.create false
RUN poetry install --no-interaction --no-ansi
RUN apk del --no-cache build-deps
COPY / /app/
ENTRYPOINT [ "python" "manage.py" "runserver" "0.0.0.0:8000" ]