flarum_docker (latest)
Published 2026-10-11 14:13:00 +00:00 by milovanderlinden
Installation
docker pull git.softwarehuis.org/softwarehuis/flarum_docker:latestsha256:f9accbe603b5dc78859d3a902397b6730c697d30301dfa16ca288d90e8f6dab7Image layers
| ADD alpine-minirootfs-3.24.2-x86_64.tar.gz / # buildkit |
| CMD ["/bin/sh"] |
| ENV PHPIZE_DEPS=autoconf dpkg-dev dpkg file g++ gcc libc-dev make pkgconf re2c |
| RUN /bin/sh -c apk add --no-cache ca-certificates curl openssl tar xz # buildkit |
| RUN /bin/sh -c set -eux; adduser -u 82 -D -S -G www-data www-data # buildkit |
| ENV PHP_INI_DIR=/usr/local/etc/php |
| RUN /bin/sh -c set -eux; mkdir -p "$PHP_INI_DIR/conf.d"; [ ! -d /var/www/html ]; mkdir -p /var/www/html; chown www-data:www-data /var/www/html; chmod 1777 /var/www/html # buildkit |
| ENV PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
| ENV PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
| ENV PHP_LDFLAGS=-Wl,-O1 -pie |
| ENV GPG_KEYS=1198C0117593497A5EC5C199286AF1F9897469DC 49D9AF6BC72A80D6691719C8AA23F5BE9C7097D4 D95C03BC702BE9515344AE3374E44BC9067701A5 |
| ENV PHP_VERSION=8.5.11 |
| ENV PHP_URL=https://www.php.net/distributions/php-8.5.11.tar.xz PHP_ASC_URL=https://www.php.net/distributions/php-8.5.11.tar.xz.asc |
| ENV PHP_SHA256=d9be75c08e8c316f4c8f4194d8fbe1750a15f6a6d9d4e3fe72082abeeb800360 |
| RUN /bin/sh -c set -eux; apk add --no-cache --virtual .fetch-deps gnupg; mkdir -p /usr/src; cd /usr/src; curl -fsSL -o php.tar.xz "$PHP_URL"; if [ -n "$PHP_SHA256" ]; then echo "$PHP_SHA256 *php.tar.xz" | sha256sum -c -; fi; curl -fsSL -o php.tar.xz.asc "$PHP_ASC_URL"; export GNUPGHOME="$(mktemp -d)"; for key in $GPG_KEYS; do gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; done; gpg --batch --verify php.tar.xz.asc php.tar.xz; gpgconf --kill all; rm -rf "$GNUPGHOME"; apk del --no-network .fetch-deps # buildkit |
| COPY docker-php-source /usr/local/bin/ # buildkit |
| RUN /bin/sh -c set -eux; apk add --no-cache --virtual .build-deps $PHPIZE_DEPS argon2-dev coreutils curl-dev gnu-libiconv-dev libsodium-dev libxml2-dev linux-headers oniguruma-dev openssl-dev readline-dev sqlite-dev ; rm -vf /usr/include/iconv.h; export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" PHP_BUILD_PROVIDER='https://github.com/docker-library/php' PHP_UNAME='Linux - Docker' ; docker-php-source extract; cd /usr/src/php; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; case "$gnuArch" in 'i686-linux-'*) export CFLAGS="$CFLAGS -msse2 -mfpmath=sse" CPPFLAGS="$CPPFLAGS -msse2 -mfpmath=sse" ; ;; esac; test "$PHP_INI_DIR" != "${PHP_INI_DIR%/php}"; ./configure --build="$gnuArch" --sysconfdir="${PHP_INI_DIR%/php}" --with-config-file-path="$PHP_INI_DIR" --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" --enable-option-checking=fatal --with-mhash --with-pic --enable-mbstring --enable-mysqlnd --with-password-argon2 --with-sodium=shared --with-pdo-sqlite=/usr --with-sqlite3=/usr --with-curl --with-iconv=/usr --with-openssl --with-readline --with-zlib --disable-phpdbg --with-pear --disable-cgi --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data ; make -j "$(nproc)"; find -type f -name '*.a' -delete; make install; find /usr/local -type f -perm '/0111' -exec sh -euxc ' strip --strip-all "$@" || : ' -- '{}' + ; make clean; cp -v php.ini-* "$PHP_INI_DIR/"; cd /; docker-php-source delete; runDeps="$( scanelf --needed --nobanner --format '%n#p' --recursive /usr/local | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' )"; apk add --no-cache $runDeps; apk del --no-network .build-deps; pecl update-channels; rm -rf /tmp/pear ~/.pearrc; php --version # buildkit |
| COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ # buildkit |
| RUN /bin/sh -c docker-php-ext-enable sodium # buildkit |
| ENTRYPOINT ["docker-php-entrypoint"] |
| WORKDIR /var/www/html |
| RUN /bin/sh -c set -eux; cd "${PHP_INI_DIR%/php}"; cp -v php-fpm.conf.default php-fpm.conf; cp -v php-fpm.d/www.conf.default php-fpm.d/www.conf; grep -E '^listen = 127.0.0.1:9000' php-fpm.d/www.conf; sed -ri 's/^(listen = 127.0.0.1:9000)/;\1/' php-fpm.d/www.conf; grep -E '^;listen = 127.0.0.1:9000' php-fpm.d/www.conf; { echo '[global]'; echo 'error_log = /proc/self/fd/2'; echo; echo '; https://github.com/docker-library/php/pull/725#issuecomment-443540114'; echo 'log_limit = 8192'; echo; echo '[www]'; echo '; php-fpm closes STDOUT on startup, so sending logs to /proc/self/fd/1 does not work.'; echo '; https://bugs.php.net/bug.php?id=73886'; echo 'access.log = /proc/self/fd/2'; echo; echo 'clear_env = no'; echo; echo '; Ensure worker stdout and stderr are sent to the main error log.'; echo 'catch_workers_output = yes'; echo 'decorate_workers_output = no'; echo; echo '; default listen address for easy override in later php-fpm.d/*.conf files'; echo 'listen = 9000'; } | tee php-fpm.d/docker.conf; { echo '[global]'; echo 'daemonize = no'; echo; echo '; the [www] ini section below is for backwards compatibility and will be removed in 8.6+'; echo '[www]'; } | tee php-fpm.d/zz-docker.conf; mkdir -p "$PHP_INI_DIR/conf.d"; { echo '; https://github.com/docker-library/php/issues/878#issuecomment-938595965'; echo 'fastcgi.logging = Off'; } > "$PHP_INI_DIR/conf.d/docker-fpm.ini" # buildkit |
| STOPSIGNAL SIGQUIT |
| EXPOSE map[9000/tcp:{}] |
| CMD ["php-fpm"] |
| ARG FLARUM_VERSION |
| ARG FLARUM_PACKAGES FLARUM_VERSION |
| ENV FLARUM_VERSION=${FLARUM_VERSION} COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_HOME=/var/www/.composer |
| |3 FLARUM_PACKAGES=flarum-lang/dutch fof/oauth:^2.0.0-rc.1 FLARUM_VERSION=2.0.0 /bin/sh -c apk add --no-cache nginx supervisor git unzip curl icu-libs libzip libpng libjpeg-turbo freetype libwebp oniguruma |
| |3 FLARUM_PACKAGES=flarum-lang/dutch fof/oauth:^2.0.0-rc.1 FLARUM_VERSION=2.0.0 /bin/sh -c apk add --no-cache --virtual .build-deps $PHPIZE_DEPS icu-dev libzip-dev libpng-dev libjpeg-turbo-dev freetype-dev libwebp-dev oniguruma-dev |
| |3 FLARUM_PACKAGES=flarum-lang/dutch fof/oauth:^2.0.0-rc.1 FLARUM_VERSION=2.0.0 /bin/sh -c docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp && docker-php-ext-install gd |
| |3 FLARUM_PACKAGES=flarum-lang/dutch fof/oauth:^2.0.0-rc.1 FLARUM_VERSION=2.0.0 /bin/sh -c docker-php-ext-install intl |
| |3 FLARUM_PACKAGES=flarum-lang/dutch fof/oauth:^2.0.0-rc.1 FLARUM_VERSION=2.0.0 /bin/sh -c docker-php-ext-install mbstring |
| |3 FLARUM_PACKAGES=flarum-lang/dutch fof/oauth:^2.0.0-rc.1 FLARUM_VERSION=2.0.0 /bin/sh -c docker-php-ext-install pdo_mysql |
| |3 FLARUM_PACKAGES=flarum-lang/dutch fof/oauth:^2.0.0-rc.1 FLARUM_VERSION=2.0.0 /bin/sh -c docker-php-ext-install zip |
| |3 FLARUM_PACKAGES=flarum-lang/dutch fof/oauth:^2.0.0-rc.1 FLARUM_VERSION=2.0.0 /bin/sh -c apk del .build-deps && rm -rf /tmp/pear |
| |3 FLARUM_PACKAGES=flarum-lang/dutch fof/oauth:^2.0.0-rc.1 FLARUM_VERSION=2.0.0 /bin/sh -c mkdir -p /run/php /var/lib/nginx/tmp /var/log/nginx /var/www/html /var/www/.composer && chown -R www-data:www-data /run/php /var/lib/nginx /var/log/nginx /var/www/html /var/www/.composer |
| COPY file:c1dd2e62c194f1a4e4b74a0170c0aaa3314d9d7d4b44953707ad16d6e382c2ab in /usr/local/etc/php/conf.d/zz-flarum.ini |
| COPY file:d7b9c5dcd2de171f7e09cfa93fc55818979933d4023ec313253f3baa23a2a4c2 in /usr/local/etc/php/conf.d/zz-opcache.ini |
| COPY file:6da829ec41563def14df7d42d58fccbf0300d96b0c3dcd4f97b268f42818c5d5 in /usr/local/etc/php-fpm.d/www.conf |
| COPY file:ed361704c8b983dbb165b2f4dfd9c2ebbf245df245d1ef5012cceea6d5340fa2 in /etc/nginx/nginx.conf |
| COPY file:d7b24c00b513d0aeb485385773b4694e42198e4170d971ecfdbdd1e159a11777 in /etc/supervisor/conf.d/supervisord.conf |
| COPY file:b31e9520c0dff146bd3b53e9f84899c4ca8a69a1ec7fab72bbc869a85c511e2d in /usr/local/bin/entrypoint.sh |
| |3 FLARUM_PACKAGES=flarum-lang/dutch fof/oauth:^2.0.0-rc.1 FLARUM_VERSION=2.0.0 /bin/sh -c chmod +x /usr/local/bin/entrypoint.sh |
| COPY file:c663b4171a3cba667932915d53bd6a7cd52693ad4454a40e9bd13533ac3fc513 in /usr/bin/composer |
| WORKDIR /var/www/html |
| |3 FLARUM_PACKAGES=flarum-lang/dutch fof/oauth:^2.0.0-rc.1 FLARUM_VERSION=2.0.0 /bin/sh -c composer create-project flarum/flarum:${FLARUM_VERSION} . --stability=beta --no-interaction --no-dev --no-progress && if [ -n "$FLARUM_PACKAGES" ]; then composer require $FLARUM_PACKAGES --no-interaction --update-no-dev --no-progress; fi && mkdir -p storage/formatter storage/cache storage/less storage/locale storage/sessions storage/views storage/logs storage/tmp && chown -R www-data:www-data /var/www/html /var/www/.composer && find /var/www/html -type d -exec chmod 775 {} \; && find /var/www/html -type f -exec chmod 664 {} \; |
| USER www-data:www-data |
| EXPOSE 8080 |
| HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD curl -fsS http://127.0.0.1:8080/ -o /dev/null || exit 1 |
| ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] |
| CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"] |
Labels
| Key | Value |
|---|---|
| io.buildah.version | 1.33.7 |
Details
2026-10-11 14:13:00 +00:00
Versions (3)
View all
Container
0
OCI / Docker
linux/amd64
218 MiB