Moving COPY higher in the nginx Dockerfile

Moving COPY higher in the Dockerfile makes the docker build fail faster if there is an error. No need to create /etc/nginx/conf.d/ manually.
This commit is contained in:
puneetse
2019-04-30 16:11:45 -07:00
committed by George T Kramer
parent bbc9ca8d62
commit e5434d77d0
+3 -2
View File
@@ -1,6 +1,8 @@
FROM clearlinux:latest
MAINTAINER bin.yang@intel.com
COPY default.conf /etc/nginx/conf.d/default.conf
RUN swupd update $swupd_args && \
swupd bundle-add nginx $swupd_args
RUN rm -rf /var/lib/swupd
@@ -11,9 +13,8 @@ RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
RUN mkdir -p /var/lib/nginx/
RUN mkdir -p /etc/nginx/conf.d
RUN cp -f /usr/share/nginx/conf/nginx.conf.example /etc/nginx/nginx.conf
COPY default.conf /etc/nginx/conf.d/default.conf
VOLUME /usr/share/nginx/html
EXPOSE 80