Skip to content

Commit fc0cf35

Browse files
committed
dockerfile optimization
1 parent c4a55e5 commit fc0cf35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ RUN (apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-e
55
RUN (easy_install pip &&\
66
pip install uwsgi)
77

8+
ADD app/requirements.txt /opt/django/app/requirements.txt
9+
RUN pip install -r /opt/django/app/requirements.txt
810
ADD . /opt/django/
911

1012
RUN (echo "daemon off;" >> /etc/nginx/nginx.conf &&\
1113
rm /etc/nginx/sites-enabled/default &&\
1214
ln -s /opt/django/django.conf /etc/nginx/sites-enabled/ &&\
1315
ln -s /opt/django/supervisord.conf /etc/supervisor/conf.d/)
1416

15-
RUN pip install -r /opt/django/app/requirements.txt
16-
1717
VOLUME ["/opt/django/app"]
1818
EXPOSE 80
1919
CMD ["/opt/django/run.sh"]

0 commit comments

Comments
 (0)