From 79717c82b1869bab0fa6139c81843911854467d9 Mon Sep 17 00:00:00 2001 From: virusdefender Date: Sat, 25 Nov 2017 19:12:37 +0800 Subject: [PATCH] move Dockerfile --- deploy/Dockerfile => Dockerfile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) rename deploy/Dockerfile => Dockerfile (70%) diff --git a/deploy/Dockerfile b/Dockerfile similarity index 70% rename from deploy/Dockerfile rename to Dockerfile index b7f7997..9e3f69c 100644 --- a/deploy/Dockerfile +++ b/Dockerfile @@ -1,16 +1,14 @@ FROM python:3.6-alpine3.6 ENV OJ_ENV production -RUN apk add --no-cache supervisor jpeg-dev zlib-dev postgresql-dev freetype-dev - -ADD deploy/requirements.txt /tmp -RUN printf "https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.6/community/\nhttps://mirrors.tuna.tsinghua.edu.cn/alpine/v3.6/main/" > /etc/apk/repositories && \ - apk add --update --no-cache build-base nginx openssl curl unzip && \ - pip install --no-cache-dir -r /tmp/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple && \ - apk del build-base --purge ADD . /app WORKDIR /app + +RUN printf "https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.6/community/\nhttps://mirrors.tuna.tsinghua.edu.cn/alpine/v3.6/main/" > /etc/apk/repositories && \ + 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 -i https://pypi.tuna.tsinghua.edu.cn/simple && \ + apk del build-base --purge RUN curl -L $(curl -s https://api.github.com/repos/QingdaoU/OnlineJudgeFE/releases/latest | grep /dist.zip | cut -d '"' -f 4) -o dist.zip && \ unzip dist.zip && \ rm dist.zip