Trying to make more out-of-box ready

This commit is contained in:
William Miceli
2019-03-30 16:45:15 -04:00
parent da907eaafc
commit f377015d5f

View File

@@ -1,4 +1,4 @@
FROM nginx:stable FROM nginx:1.14.2
USER root USER root
# Version of Grav to install # Version of Grav to install
@@ -31,14 +31,13 @@ RUN mkdir -p /var/www \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& chown www-data:www-data /var/www && chown www-data:www-data /var/www
# Configure nginx with grav # Configure NGINX with Grav
WORKDIR /var/www/grav-admin ADD https://raw.githubusercontent.com/getgrav/grav/fb20b58369d5e0140a4fa6da06edf8f40412f7bf/webserver-configs/nginx.conf /etc/nginx/conf.d/default.conf
RUN cd webserver-configs \ RUN sed -i 's/root \/home\/USER\/www\/html/root \/var\/www\/grav-admin/g' /etc/nginx/conf.d/default.conf \
&& sed -i 's/root \/home\/USER\/www\/html/root \/var\/www\/grav-admin/g' nginx.conf \ && sed -i 's/#listen 80;/listen 80;/g' /etc/nginx/conf.d/default.conf
&& cp nginx.conf /etc/nginx/conf.d/default.conf
# Set the file permissions # Set the file permissions
RUN usermod -aG www-data nginx RUN usermod -aG www-data nginx
# Run startup script EXPOSE 80
ADD resources / CMD ["nginx", "-g", "daemon off;"]