2021-02-01 09:34:39 -05:00
|
|
|
FROM alpine:3.13
|
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" \
|
2020-10-11 10:50:32 -04:00
|
|
|
maintainer="Magicalex <magicalex@mondedie.fr>, Hardware <hardware@mondedie.fr>"
|
2016-07-14 04:12:58 -04:00
|
|
|
|
2021-03-16 13:20:57 -04:00
|
|
|
ARG VERSION=v0.1.0-beta.16
|
2016-07-17 05:35:13 -04:00
|
|
|
|
2018-02-17 04:21:10 -05: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 \
|
2020-02-09 13:55:56 -05:00
|
|
|
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 \
|
2020-02-09 13:55:56 -05:00
|
|
|
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-03-16 13:40:14 -04:00
|
|
|
&& ln -s /usr/bin/php8 /usr/bin/php \
|
2019-11-26 21:42:51 -05:00
|
|
|
&& curl -s 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 \
|
2020-02-09 17:10:31 -05:00
|
|
|
&& rm -rf /flarum/.composer /tmp/* \
|
|
|
|
&& setcap CAP_NET_BIND_SERVICE=+eip /usr/sbin/nginx
|
2016-07-14 04:12:58 -04:00
|
|
|
|
2017-05-13 05:12:25 -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/*
|
2018-11-29 22:00:50 -05:00
|
|
|
VOLUME /flarum/app/extensions /etc/nginx/conf.d
|
2019-12-28 13:26:58 -05:00
|
|
|
CMD ["/usr/local/bin/startup"]
|