docker-flarum/Dockerfile

69 lines
1.7 KiB
Docker
Raw Normal View History

2022-06-05 17:01:08 -04:00
FROM alpine:3.16
2017-03-12 13:49:45 -04:00
2019-11-28 08:42:34 -05:00
LABEL description="Simple forum software for building great communities" \
2022-06-06 08:50:08 -04:00
maintainer="Magicalex <magicalex@mondedie.fr>"
2016-07-14 04:12:58 -04:00
ARG VERSION=v1.3.0
2016-07-17 05:35:13 -04:00
ENV GID=991 \
UID=991 \
UPLOAD_MAX_SIZE=50M \
PHP_MEMORY_LIMIT=128M \
2019-12-28 16:24:02 -05:00
OPCACHE_MEMORY_LIMIT=128 \
DB_HOST=mariadb \
DB_USER=flarum \
DB_NAME=flarum \
DB_PORT=3306 \
FLARUM_TITLE=Docker-Flarum \
DEBUG=false \
LOG_TO_STDOUT=false \
GITHUB_TOKEN_AUTH=false \
FLARUM_PORT=8888
2016-07-14 04:12:58 -04:00
2019-12-28 13:26:58 -05:00
RUN apk add --no-progress --no-cache \
curl \
git \
2022-06-06 08:50:08 -04:00
icu-data-full \
libcap \
2020-05-30 21:33:53 -04:00
nginx \
2021-03-16 13:20:57 -04:00
php8 \
php8-ctype \
php8-curl \
php8-dom \
php8-exif \
php8-fileinfo \
php8-fpm \
php8-gd \
php8-gmp \
php8-iconv \
php8-intl \
php8-mbstring \
php8-mysqlnd \
php8-opcache \
php8-pecl-apcu \
php8-openssl \
php8-pdo \
php8-pdo_mysql \
php8-phar \
php8-session \
php8-tokenizer \
php8-xmlwriter \
php8-zip \
php8-zlib \
2020-05-30 21:33:53 -04:00
su-exec \
s6 \
2019-11-26 21:42:51 -05:00
&& cd /tmp \
2021-05-31 18:13:52 -04:00
&& curl --progress-bar http://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
2021-03-16 13:20:57 -04:00
&& sed -i 's/memory_limit = .*/memory_limit = ${PHP_MEMORY_LIMIT}/' /etc/php8/php.ini \
2019-11-26 21:42:51 -05:00
&& chmod +x /usr/local/bin/composer \
2021-03-16 15:59:35 -04:00
&& mkdir -p /run/php /flarum/app \
2021-05-26 17:27:16 -04:00
&& COMPOSER_CACHE_DIR="/tmp" composer create-project flarum/flarum:$VERSION /flarum/app \
2019-11-26 21:42:51 -05:00
&& composer clear-cache \
&& rm -rf /flarum/.composer /tmp/* \
&& setcap CAP_NET_BIND_SERVICE=+eip /usr/sbin/nginx
2016-07-14 04:12:58 -04:00
COPY rootfs /
2021-03-16 16:24:25 -04:00
RUN chmod +x /usr/local/bin/* /etc/s6.d/*/run /etc/s6.d/.s6-svscan/*
2021-05-30 19:36:46 -04:00
VOLUME /etc/nginx/flarum /flarum/app/extensions /flarum/app/public/assets /flarum/app/storage/logs
2019-12-28 13:26:58 -05:00
CMD ["/usr/local/bin/startup"]