FROM alpine:3.13 LABEL description="Simple forum software for building great communities" \ maintainer="Magicalex , Hardware " ARG VERSION=v1.0.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 \ DB_WAIT=false \ 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 \ 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 \ && ln -s /usr/bin/php8 /usr/bin/php \ && curl -s http://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && curl -L --progress-bar https://github.com/xxxxxliil/db-live-test/releases/download/0.0.1/db-live-test.php -o /usr/local/bin/db-live-test \ && 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"]