Skip to content

Commit d07e109

Browse files
author
Serhii Khortiuk
authored
Merge pull request #10 from thestd/new_dockerfile
new dockerfile
2 parents f1ac9b7 + e0d7247 commit d07e109

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

Dockerfile

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
FROM python:3.6
1+
FROM python:3.7.4-alpine3.10 as base
2+
RUN apk add --no-cache build-base libxml2-dev libxslt-dev
3+
COPY ./requirements.txt /requirements.txt
4+
RUN pip3 install --target="/install" -r /requirements.txt
5+
6+
7+
FROM python:3.7.4-alpine3.10
28
ENV PYTHONUNBUFFERED 1
9+
RUN apk add --no-cache libxml2-dev libxslt-dev
10+
COPY --from=base /install /usr/local/lib/python3.7/site-packages
311
RUN mkdir /app
412
WORKDIR /app
5-
COPY . .
6-
RUN pip3 install --no-cache-dir -r requirements.txt
7-
8-
EXPOSE 8085
9-
10-
ENTRYPOINT python3 manage.py runserver
13+
COPY ./ ./
14+
RUN pip3 install -r requirements.txt
15+
ENTRYPOINT ["python3", "manage.py", "runserver"]

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: '3.7'
1+
version: '3'
22

33
services:
44
api:

0 commit comments

Comments
 (0)