add dockerfiles

This commit is contained in:
zema1
2017-10-23 20:59:44 +08:00
parent 1b0952cd0d
commit e8841eae82
13 changed files with 67 additions and 65 deletions

View File

@@ -1,10 +1,13 @@
FROM python:3.6-alpine3.6
ADD requirements.txt /tmp
RUN apk add --no-cache --virtual .build-deps build-base jpeg-dev zlib-dev postgresql-dev && \
pip install -r /tmp/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple && \
apk del .build-deps --purge
ENV OJ_ENV production
RUN apk add --no-cache nginx supervisor jpeg-dev zlib-dev postgresql-dev freetype-dev
Volume ["/app"]
ADD requirements.txt /tmp
RUN apk add --no-cache build-base && \
pip install --no-cache-dir -r /tmp/requirements.txt -i https://pypi.doubanio.com/simple && \
apk del build-base --purge
VOLUME [ "/app" ]
CMD sh /app/deploy/run.sh