docker-flox/Dockerfile
renovate-bot b3ffeb7f1b
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
Update mwalbeck/supercronic:0.2.33 Docker digest to 9d79b39
2024-10-17 07:07:34 +00:00

64 lines
1.8 KiB
Docker

FROM mwalbeck/supercronic:0.2.33@sha256:9d79b394ac388ad70f0c9c083dc0c95bab1eb848b954f8e90625111ae41dec13 as supercronic
FROM mwalbeck/composer:1.10.27-php7.4@sha256:4aafb89e7f718e0124f29d416b9e8839788f85392ab7b2ccfbfc4b313ec0f12b AS composer
ENV FLOX_VERSION master
RUN set -ex; \
\
git clone --branch $FLOX_VERSION https://github.com/devfake/flox.git /tmp/flox; \
cd /tmp/flox/backend; \
composer --no-cache install;
FROM php:7.4.33-fpm-bullseye@sha256:3ac7c8c74b2b047c7cb273469d74fc0d59b857aa44043e6ea6a0084372811d5b
COPY --from=composer /tmp/flox /usr/share/flox
COPY --from=supercronic /supercronic /usr/local/bin/supercronic
RUN set -ex; \
\
groupadd --system foo; \
useradd --no-log-init --system --gid foo --create-home foo; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
supervisor \
gosu \
sqlite3 \
rsync \
libpq5 \
libpq-dev \
; \
chmod +x /usr/local/bin/supercronic; \
echo '* * * * * php /var/www/flox/backend/artisan schedule:run >> /dev/null 2>&1' > /crontab; \
\
mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"; \
\
{ \
echo "upload_max_filesize=128M"; \
echo "post_max_size=128M"; \
} > /usr/local/etc/php/conf.d/flox.ini; \
\
mkdir -p \
/var/log/supervisord \
/var/run/supervisord \
/var/www/flox \
; \
docker-php-ext-install -j "$(nproc)" \
bcmath \
pdo_mysql \
pdo_pgsql \
opcache \
; \
apt-get purge -y --autoremove libpq-dev; \
rm -rf /var/lib/apt/lists/*;
COPY entrypoint.sh /entrypoint.sh
COPY supervisord.conf /supervisord.conf
VOLUME [ "/var/www/flox" ]
WORKDIR /var/www/flox
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]