make docker build 2 stage

This commit is contained in:
dave 2020-10-26 21:12:57 -07:00
parent 4319c93138
commit 1345d750b4
1 changed files with 4 additions and 1 deletions

View File

@ -4,10 +4,13 @@ RUN apt-get update && \
apt-get install -y python3-pip gpgv1 gnupg1 gpg sudo wget git && \ apt-get install -y python3-pip gpgv1 gnupg1 gpg sudo wget git && \
useradd artifact useradd artifact
ADD requirements.txt /tmp/requirements.txt
RUN pip3 install -r /tmp/requirements.txt
ADD . /tmp/code ADD . /tmp/code
RUN cd /tmp/code && \ RUN cd /tmp/code && \
pip3 install -r requirements.txt && \
python3 setup.py install python3 setup.py install
USER artifact USER artifact