Initial commit

This commit is contained in:
Andy Miller 2018-09-13 17:17:18 -06:00
parent 3281e9388d
commit 7eee9d5e35
No known key found for this signature in database
GPG Key ID: E82B8D0EAB94EFB9
1 changed files with 46 additions and 0 deletions

46
Dockerfile Normal file
View File

@ -0,0 +1,46 @@
FROM php:7.2-apache
LABEL maintainer="Andy Miller <rhuk@getgrav.org> (@rhukster)"
# Enable Apache Rewrite Module
RUN a2enmod rewrite
# Install dependencies
RUN apt-get update && apt-get install -y \
unzip \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libyaml-dev \
&& docker-php-ext-install opcache \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install zip
RUN pecl install apcu \
&& pecl install yaml \
&& docker-php-ext-enable apcu yaml
# Set user to www-data
RUN chown www-data:www-data /var/www
USER www-data
# Define Grav version and expected SHA1 signature
ENV GRAV_VERSION 1.5.1
ENV GRAV_SHA1 5292b05d304329beefeddffbf9f542916012c221
# Install grav
WORKDIR /var/www
RUN curl -o grav-admin.zip -SL https://getgrav.org/download/core/grav-admin/${GRAV_VERSION} && \
echo "$GRAV_SHA1 grav-admin.zip" | sha1sum -c - && \
unzip grav-admin.zip && \
mv -T /var/www/grav-admin /var/www/html && \
rm grav-admin.zip
# Return to root user
USER root
# Copy init scripts
# COPY docker-entrypoint.sh /entrypoint.sh
# ENTRYPOINT ["/entrypoint.sh"]
# CMD ["apache2-foreground"]