Fix Docker build

This commit is contained in:
Quentin McGaw 2022-03-09 07:04:58 -05:00
parent 03e7ca2975
commit e853919de2
2 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,7 @@ tests
.styleci.yml .styleci.yml
.travis.yml .travis.yml
changelog.md changelog.md
docker/README.md
Dockerfile Dockerfile
LICENSE LICENSE
README.md README.md

View File

@ -5,11 +5,16 @@ ARG PHP_VERSION=7.3-alpine${ALPINE_VERSION}
ARG COMPOSER_VERSION=2.1 ARG COMPOSER_VERSION=2.1
ARG SUPERVISORD_VERSION=v0.7.3 ARG SUPERVISORD_VERSION=v0.7.3
ARG UID=1000
ARG GID=1000
FROM --platform=${BUILDPLATFORM} composer:${COMPOSER_VERSION} AS build-composer FROM --platform=${BUILDPLATFORM} composer:${COMPOSER_VERSION} AS build-composer
FROM composer:${COMPOSER_VERSION} AS composer FROM composer:${COMPOSER_VERSION} AS composer
FROM qmcgaw/binpot:supervisord-${SUPERVISORD_VERSION} AS supervisord FROM qmcgaw/binpot:supervisord-${SUPERVISORD_VERSION} AS supervisord
FROM --platform=${BUILDPLATFORM} php:${PHP_VERSION} AS vendor FROM --platform=${BUILDPLATFORM} php:${PHP_VERSION} AS vendor
ARG UID=1000
ARG GID=1000
COPY --from=build-composer --chown=${UID}:${GID} /usr/bin/composer /usr/bin/composer COPY --from=build-composer --chown=${UID}:${GID} /usr/bin/composer /usr/bin/composer
RUN apk add --no-cache unzip RUN apk add --no-cache unzip
WORKDIR /srv WORKDIR /srv
@ -26,7 +31,6 @@ RUN php artisan key:generate
ENTRYPOINT [ "/srv/vendor/bin/phpunit" ] ENTRYPOINT [ "/srv/vendor/bin/phpunit" ]
FROM alpine:${ALPINE_VERSION} FROM alpine:${ALPINE_VERSION}
ARG UID=1000 ARG UID=1000
ARG GID=1000 ARG GID=1000