renovate-bot
c6b0866e9d
Some checks reported errors
continuous-integration/drone/pr Build was killed
86 lines
2.4 KiB
Docker
86 lines
2.4 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 --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"]
|