Move prep steps into composer. Define a volume at /var/www/flox and make sure entrypoint script ends in that folder

This commit is contained in:
Magnus Walbeck 2021-03-20 15:41:31 +01:00
parent 45dc6c9989
commit 5dd1050d01
Signed by: mwalbeck
GPG key ID: CCB78CFF3F950769
2 changed files with 5 additions and 14 deletions

View file

@ -9,25 +9,13 @@ RUN set -ex; \
go mod vendor; \
go install;
FROM debian:10.8-slim@sha256:8bf6c883f182cfed6375bd21dbf3686d4276a2f4c11edc28f53bd3f6be657c94 AS prep
FROM composer:1.10.19@sha256:594befc8126f09039ad17fcbbd2e4e353b1156aba20556a6c474a8ed07ed7a5a AS composer
ENV FLOX_VERSION master
RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
git \
ca-certificates \
; \
git clone --branch $FLOX_VERSION https://github.com/devfake/flox.git /flox;
FROM composer:1.10.19@sha256:594befc8126f09039ad17fcbbd2e4e353b1156aba20556a6c474a8ed07ed7a5a AS composer
COPY --from=prep /flox /flox
RUN set -ex; \
\
git clone --branch $FLOX_VERSION https://github.com/devfake/flox.git /flox; \
cd /flox/backend; \
composer install;
@ -72,6 +60,7 @@ RUN set -ex; \
COPY entrypoint.sh /entrypoint.sh
COPY supervisord.conf /supervisord.conf
VOLUME [ "/var/www/flox" ]
WORKDIR /var/www/flox
ENTRYPOINT ["/entrypoint.sh"]

View file

@ -91,4 +91,6 @@ chown -R foo:foo /var/www/flox \
/var/log/supervisord \
/var/run/supervisord
cd /var/www/flox
exec gosu foo "$@"