docker-getgrav/1.7/Dockerfile
renovate-bot c6b0866e9d
Some checks reported errors
continuous-integration/drone/pr Build was killed
Update dependency getgrav/grav to v1.7.48
2024-10-28 12:16:04 +00:00

85 lines
2.3 KiB
Docker

FROM php:8.1.30-fpm-bullseye@sha256:5f91e7cf6fc263328bcfd3ac9e58e17ee4aa8196c9eca023a1dcb98591ffb90a
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 --system foo; \
useradd --no-log-init --system --gid foo --create-home foo; \
\
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.sh /entrypoint.sh
COPY grav.ini $PHP_INI_DIR/conf.d/
EXPOSE 9000
ENTRYPOINT ["/entrypoint.sh"]
CMD ["php-fpm"]