From c70d04d3f2aab085017d6c212ca9b4b614bc13d5 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Sun, 9 Jun 2019 20:23:08 +0800 Subject: [PATCH] updated Dockerfile --- Dockerfile | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6c2d60e1..4416dfde 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,9 @@ # images FROM ubuntu:latest +# source files +ADD . /opt/crawlab + # set as non-interactive ENV DEBIAN_FRONTEND noninteractive @@ -9,21 +12,6 @@ ENV NVM_DIR /usr/local/nvm ENV NODE_VERSION 8.12.0 ENV WORK_DIR /opt/crawlab -# source files -ADD . /opt/crawlab - -# install python -RUN apt-get update -RUN apt-get install -y python3 python3-pip net-tools iputils-ping git nginx ntp curl - -# python soft link -RUN ln -s /usr/bin/pip3 /usr/local/bin/pip -RUN ln -s /usr/bin/python3 /usr/local/bin/python - -# install backend -RUN pip install -U setuptools -i https://pypi.tuna.tsinghua.edu.cn/simple -RUN pip install -r /opt/crawlab/crawlab/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple - # install nvm RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.24.0/install.sh | bash \ && . $NVM_DIR/nvm.sh \ @@ -39,6 +27,18 @@ RUN ls $NVM_DIR/versions/v$NODE_VERSION/bin RUN $NVM_DIR/versions/v$NODE_VERSION/bin/npm install -g yarn pm2 RUN cd /opt/crawlab/frontend && $NVM_DIR/versions/v$NODE_VERSION/bin/yarn install +# install python +RUN apt-get update +RUN apt-get install -y python3 python3-pip net-tools iputils-ping git nginx ntp curl + +# python soft link +RUN ln -s /usr/bin/pip3 /usr/local/bin/pip +RUN ln -s /usr/bin/python3 /usr/local/bin/python + +# install backend +RUN pip install -U setuptools -i https://pypi.tuna.tsinghua.edu.cn/simple +RUN pip install -r /opt/crawlab/crawlab/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple + # nginx config & start frontend RUN cp $WORK_DIR/crawlab.conf /etc/nginx/conf.d RUN service nginx reload