Starting my own using Evns' version - Credit to them for their work

This commit is contained in:
WilliamMiceli
2019-03-08 15:18:05 -05:00
parent 72809072f2
commit 539f2aad46
2 changed files with 45 additions and 0 deletions

44
Dockerfile Normal file
View File

@@ -0,0 +1,44 @@
FROM nginx:1.11.9
# Desired version of grav
ARG GRAV_VERSION=1.1.16
# Install dependencies
RUN apt-get update && \
apt-get install -y sudo wget vim unzip php5 php5-curl php5-gd php-pclzip php5-fpm
ADD https://github.com/krallin/tini/releases/download/v0.13.2/tini /usr/local/bin/tini
RUN chmod +x /usr/local/bin/tini
# Set user to www-data
RUN mkdir -p /var/www && chown www-data:www-data /var/www
USER www-data
# Install grav
WORKDIR /var/www
RUN wget https://github.com/getgrav/grav/releases/download/$GRAV_VERSION/grav-admin-v$GRAV_VERSION.zip && \
unzip grav-admin-v$GRAV_VERSION.zip && \
rm grav-admin-v$GRAV_VERSION.zip && \
cd grav-admin && \
bin/gpm install -f -y admin
# Return to root user
USER root
# Install Acmetool Let's Encrypt client
RUN echo 'deb http://ppa.launchpad.net/hlandau/rhea/ubuntu xenial main' > /etc/apt/sources.list.d/rhea.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9862409EF124EC763B84972FF5AC9651EDB58DFA \
&& apt-get update \
&& apt-get install acmetool
# Configure nginx with grav
WORKDIR grav-admin
RUN cd webserver-configs && \
sed -i 's/root \/home\/USER\/www\/html/root \/var\/www\/grav-admin/g' nginx.conf && \
cp nginx.conf /etc/nginx/conf.d/default.conf
# Set the file permissions
RUN usermod -aG www-data nginx
# Run startup script
ADD resources /
ENTRYPOINT [ "/usr/local/bin/tini", "--", "/usr/local/bin/startup.sh" ]

View File

@@ -1,2 +1,3 @@
# Grav on Docker # Grav on Docker
[https://github.com/evnsio/grav]