Trying to make more out-of-box ready
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -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;"]
|
||||||
Reference in New Issue
Block a user