GetTogether/Dockerfile

23 lines
524 B
Text
Raw Normal View History

FROM python:3-alpine as builder
2017-12-30 08:08:43 +01:00
WORKDIR /home/python
RUN apk add --no-cache zlib-dev build-base python-dev jpeg-dev
RUN pip install virtualenv
RUN virtualenv venv
ADD requirements.txt /home/python/
RUN venv/bin/pip install --no-cache-dir -r requirements.txt
RUN virtualenv --relocatable venv/
ADD . /home/python/
RUN venv/bin/python manage.py migrate
FROM python:3-alpine
WORKDIR /home/python
COPY --from=builder /home/python /home/python
ENTRYPOINT ["venv/bin/python"]
CMD ["manage.py", "runserver", "0.0.0.0:8000"]