-
Notifications
You must be signed in to change notification settings - Fork 133
/
Dockerfile
68 lines (63 loc) · 1.72 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM alpine:3.16
LABEL description="Simple forum software for building great communities" \
maintainer="Magicalex <[email protected]>"
ARG VERSION=v1.3.0
ENV GID=991 \
UID=991 \
UPLOAD_MAX_SIZE=50M \
PHP_MEMORY_LIMIT=128M \
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
RUN apk add --no-progress --no-cache \
curl \
git \
icu-data-full \
libcap \
nginx \
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 \
su-exec \
s6 \
&& cd /tmp \
&& curl --progress-bar http://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& sed -i 's/memory_limit = .*/memory_limit = ${PHP_MEMORY_LIMIT}/' /etc/php8/php.ini \
&& chmod +x /usr/local/bin/composer \
&& mkdir -p /run/php /flarum/app \
&& COMPOSER_CACHE_DIR="/tmp" composer create-project flarum/flarum:$VERSION /flarum/app \
&& composer clear-cache \
&& rm -rf /flarum/.composer /tmp/* \
&& setcap CAP_NET_BIND_SERVICE=+eip /usr/sbin/nginx
COPY rootfs /
RUN chmod +x /usr/local/bin/* /etc/s6.d/*/run /etc/s6.d/.s6-svscan/*
VOLUME /etc/nginx/flarum /flarum/app/extensions /flarum/app/public/assets /flarum/app/storage/logs
CMD ["/usr/local/bin/startup"]