forked from QingdaoU/OnlineJudge
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
18 lines (12 loc) · 600 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM python:3.7-alpine3.9
ENV OJ_ENV production
ADD . /app
WORKDIR /app
HEALTHCHECK --interval=5s --retries=3 CMD python2 /app/deploy/health_check.py
RUN apk add --update --no-cache build-base nginx openssl curl unzip supervisor jpeg-dev zlib-dev postgresql-dev freetype-dev && \
pip install --no-cache-dir -r /app/deploy/requirements.txt && \
apk del build-base --purge
RUN curl -L $(curl -s https://api.github.com/repos/Harry-zklcdc/OJ/releases/latest | grep /dist.zip | cut -d '"' -f 4) -o dist.zip && \
unzip dist.zip && \
rm dist.zip
ENTRYPOINT /app/deploy/entrypoint.sh