docker-getgrav/1.7/Dockerfile.prod
renovate-bot 7531c44ba0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
Update php:8.1.30-fpm-bullseye Docker digest to a0e3ef9
2024-11-17 22:16:35 +00:00

86 lines
2.4 KiB
Docker

FROM php:8.1.30-fpm-bullseye@sha256:a0e3ef958c67e6a5ea4b056cdb2aa723eefa4caebff16639bff4e7ec1dcb3353
SHELL [ "/bin/bash", "-exo", "pipefail", "-c" ]
# renovate: datasource=github-tags depName=getgrav/grav versioning=semver
ENV GRAV_VERSION 1.7.48
# renovate: datasource=github-tags depName=krakjoe/apcu versioning=semver
ENV PHP_APCU_VERSION v5.1.24
# renovate: datasource=github-tags depName=php/pecl-file_formats-yaml versioning=semver
ENV PHP_YAML_VERSION 2.2.4
RUN groupadd --force --system --gid 33 www-data; \
useradd --no-log-init --system --gid www-data --no-create-home --uid 33 www-data || true; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
git \
unzip \
rsync \
gosu \
##### Run dependencies
libzip4 \
libyaml-0-2 \
libpng16-16 \
libjpeg62-turbo \
libwebp6 \
libfreetype6 \
##### Build dependencies
libwebp-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
libyaml-dev \
libzip-dev \
; \
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \
docker-php-ext-install -j "$(nproc)" \
zip \
gd \
opcache \
; \
pecl install apcu-${PHP_APCU_VERSION:1}; \
pecl install yaml-$PHP_YAML_VERSION; \
\
docker-php-ext-enable \
apcu \
yaml \
; \
apt-get purge -y --auto-remove \
libwebp-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
libyaml-dev \
libzip-dev \
; \
rm -rf /var/lib/apt/lists/*; \
\
mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"; \
\
git clone --branch $GRAV_VERSION https://github.com/getgrav/grav.git /usr/share/grav; \
rm -rf \
/usr/share/grav/.editorconfig \
/usr/share/grav/.gitignore \
/usr/share/grav/.travis.yml \
/usr/share/grav/.git \
/usr/share/grav/assets \
/usr/share/grav/backup \
/usr/share/grav/cache \
/usr/share/grav/images \
/usr/share/grav/logs \
/usr/share/grav/tmp \
/usr/share/grav/tests \
/usr/share/grav/webserver-configs \
/usr/share/grav/user \
;
COPY entrypoint.prod.sh /entrypoint.sh
COPY grav.ini $PHP_INI_DIR/conf.d/
VOLUME [ "/var/www", "/tmp" ]
EXPOSE 9000
ENTRYPOINT ["/entrypoint.sh"]
CMD ["php-fpm"]