docker-flarum/Dockerfile

68 lines
1.7 KiB
Docker
Raw Normal View History

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
2020-12-21 15:42:42 -05:00
ARG VERSION=v0.1.0-beta.15
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 \
libcap \
2020-05-30 21:33:53 -04:00
nginx \
2019-12-28 13:26:58 -05:00
php7 \
2020-05-30 21:33:53 -04:00
php7-ctype \
php7-curl \
php7-dom \
php7-exif \
2019-12-28 13:26:58 -05:00
php7-fileinfo \
php7-fpm \
2020-05-30 21:33:53 -04:00
php7-gd \
php7-gmp \
php7-iconv \
php7-intl \
php7-json \
2019-12-28 13:26:58 -05:00
php7-mbstring \
2020-05-30 21:33:53 -04:00
php7-mysqlnd \
php7-opcache \
2019-12-28 13:26:58 -05:00
php7-openssl \
php7-pdo \
php7-pdo_mysql \
2020-05-30 21:33:53 -04:00
php7-phar \
2019-12-28 13:26:58 -05:00
php7-session \
php7-tokenizer \
2020-05-30 21:33:53 -04:00
php7-xmlwriter \
2019-12-28 13:26:58 -05:00
php7-zip \
2020-05-30 21:33:53 -04:00
php7-zlib \
su-exec \
s6 \
2019-11-26 21:42:51 -05:00
&& cd /tmp \
&& curl -s http://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
2020-11-20 12:02:41 -05:00
&& sed -i 's/memory_limit = .*/memory_limit = ${PHP_MEMORY_LIMIT}/' /etc/php7/php.ini \
2019-11-26 21:42:51 -05:00
&& chmod +x /usr/local/bin/composer \
&& mkdir -p /flarum/app \
2019-12-28 17:47:12 -05:00
&& COMPOSER_CACHE_DIR="/tmp" composer create-project --stability=beta --no-progress -- flarum/flarum /flarum/app $VERSION \
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 /
RUN chmod +x /usr/local/bin/* /services/*/run /services/.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"]