-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
63 lines (54 loc) · 1.81 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
FROM mwalbeck/supercronic:0.2.33@sha256:a9f1965dd08fd78599cb467e68e78eac390e67be6605142497f58b81a6ace44e 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"]