forked from crazy-max/docker-flarum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
71 lines (63 loc) · 1.55 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
69
70
71
ARG FLARUM_VERSION=v1.1.1
FROM crazymax/yasu:latest AS yasu
FROM crazymax/alpine-s6:3.14-2.2.0.3
COPY --from=yasu / /
RUN apk --update --no-cache add \
bash \
curl \
libgd \
mysql-client \
nginx \
php8 \
php8-cli \
php8-ctype \
php8-curl \
php8-dom \
php8-exif \
php8-fileinfo \
php8-fpm \
php8-gd \
php8-gmp \
php8-iconv \
php8-intl \
php8-json \
php8-mbstring \
php8-opcache \
php8-openssl \
php8-pdo \
php8-pdo_mysql \
php8-pecl-uuid \
php8-phar \
php8-session \
php8-simplexml \
php8-sodium \
php8-tokenizer \
php8-xml \
php8-xmlwriter \
php8-zip \
php8-zlib \
shadow \
tar \
tzdata \
&& ln -s /usr/bin/php8 /usr/bin/php \
&& rm -rf /tmp/* /var/cache/apk/* /var/www/*
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS="2"\
TZ="UTC" \
PUID="1000" \
PGID="1000"
ARG FLARUM_VERSION
RUN mkdir -p /opt/flarum \
&& curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer \
&& COMPOSER_CACHE_DIR="/tmp" composer create-project flarum/flarum /opt/flarum --no-install \
&& COMPOSER_CACHE_DIR="/tmp" composer require --working-dir /opt/flarum flarum/core:${FLARUM_VERSION} \
&& composer clear-cache \
&& addgroup -g ${PGID} flarum \
&& adduser -D -h /opt/flarum -u ${PUID} -G flarum -s /bin/sh -D flarum \
&& chown -R flarum. /opt/flarum \
&& rm -rf /root/.composer /tmp/*
COPY rootfs /
RUN chmod +x /usr/local/bin/*
EXPOSE 8000
WORKDIR /opt/flarum
VOLUME [ "/data" ]
ENTRYPOINT [ "/init" ]