forked from mondediefr/docker-flarum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
67 lines (62 loc) · 1.7 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
FROM alpine:3.12
LABEL description="Simple forum software for building great communities" \
maintainer="Magicalex <[email protected]>, Hardware <[email protected]>"
ARG VERSION=v0.1.0-beta.14
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 \
libcap \
nginx \
php7 \
php7-ctype \
php7-curl \
php7-dom \
php7-exif \
php7-fileinfo \
php7-fpm \
php7-gd \
php7-gmp \
php7-iconv \
php7-intl \
php7-json \
php7-mbstring \
php7-mysqlnd \
php7-opcache \
php7-openssl \
php7-pdo \
php7-pdo_mysql \
php7-phar \
php7-session \
php7-tokenizer \
php7-xmlwriter \
php7-zip \
php7-zlib \
su-exec \
s6 \
&& cd /tmp \
&& curl -s http://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& sed -i 's/memory_limit = .*/memory_limit = ${PHP_MEMORY_LIMIT}/' /etc/php7/php.ini \
&& chmod +x /usr/local/bin/composer \
&& mkdir -p /flarum/app \
&& COMPOSER_CACHE_DIR="/tmp" composer create-project --stability=beta --no-progress -- flarum/flarum /flarum/app $VERSION \
&& 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/* /services/*/run /services/.s6-svscan/*
VOLUME /flarum/app/extensions /etc/nginx/conf.d
CMD ["/usr/local/bin/startup"]