diff --git a/Dockerfile.caddy b/Dockerfile.caddy index 38494b2..3147c24 100644 --- a/Dockerfile.caddy +++ b/Dockerfile.caddy @@ -1,10 +1,14 @@ -FROM caddy:latest -COPY . /var/www/html/public +FROM php:8.2-fpm-alpine +COPY . /var/www/html/ RUN apk add --no-cache git libzip-dev zip \ && docker-php-ext-install zip \ - && cd /var/www/html/public \ + && cd /var/www/html \ && chmod +x composer_install.sh && ./composer_install.sh \ && mv composer.phar /usr/local/bin/composer \ && composer install --no-cache \ && rm composer_install.sh Dockerfile.caddy Dockerfile.php + +FROM caddy:latest +COPY . /var/www/html/public +COPY --from=0 /var/www/html/vendor /var/www/html/public/vendor