From b63a4f2a5f3f531238902863325cea374fdaba6b Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 1 Feb 2023 11:38:00 +0100 Subject: [PATCH] finish image --- Dockerfile | 91 ++++++++++++++++++++++++++---------------------------- 1 file changed, 43 insertions(+), 48 deletions(-) diff --git a/Dockerfile b/Dockerfile index be6c54c..1e2bb7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,56 +29,51 @@ RUN apk update && apk add --no-cache \ && apk add postgresql${POSTGRES_VERSION}-client \ && apk del wget gnupg libpq-dev icu-dev oniguruma-dev libzip-dev linux-headers gcc g++ make autoconf -# "ERROR: Package cache is not enabled." \ -# https://github.com/gliderlabs/docker-alpine/issues/224 -#RUN apk cache clean +RUN { \ + echo ""; \ + echo "memory_limit = 512M"; \ + echo ""; \ + } >> /usr/local/etc/php/conf.d/memory_limit.ini +RUN { \ + echo ""; \ + echo "[Date]"; \ + echo "date.timezone = Europe/Brussels"; \ + echo ""; \ + } >> /usr/local/etc/php/conf.d/date.ini -#RUN { \ -# echo ""; \ -# echo "memory_limit = 512M"; \ -# echo ""; \ -# } >> /usr/local/etc/php/conf.d/memory_limit.ini -# -#RUN { \ -# echo ""; \ -# echo "[Date]"; \ -# echo "date.timezone = Europe/Brussels"; \ -# echo ""; \ -# } >> /usr/local/etc/php/conf.d/date.ini -# -#COPY --from=composer:2 /usr/bin/composer /usr/bin/composer -#ENV COMPOSER_ALLOW_SUPERUSER=1 -#ENV COMPOSER_MEMORY_LIMIT=-1 -# -#WORKDIR /var/www/app -# -#CMD ["php-fpm"] -# -#FROM chill_base_php82 AS chill_php82 -# -## copy directories -# -#COPY ./bin /var/www/app/bin/. -#COPY ./composer.* /var/www/app/ -#COPY ./config /var/www/app/config/. -#COPY ./migrations /var/www/app/migrations/. -#COPY ./public /var/www/app/public/. -#COPY ./src /var/www/app/src/. -#COPY ./templates /var/www/app/templates/. -#COPY ./translations /var/www/app/translations/. -#COPY ./vendor /var/www/app/vendor/. -# -#COPY ./.env /var/www/app/.env -# -## import the manifest.json file -#COPY ./public/build/manifest.json /var/www/app/public/build/manifest.json -# -#ADD ./entrypoint.sh /. -# -#RUN chmod +x /entrypoint.sh -# -#ENTRYPOINT ["/entrypoint.sh"] +COPY --from=composer:2 /usr/bin/composer /usr/bin/composer +ENV COMPOSER_ALLOW_SUPERUSER=1 +ENV COMPOSER_MEMORY_LIMIT=-1 + +WORKDIR /var/www/app + +CMD ["php-fpm"] + +FROM chill_base_php82 AS chill_php82 + +# copy directories + +COPY ./bin /var/www/app/bin/. +COPY ./composer.* /var/www/app/ +COPY ./config /var/www/app/config/. +COPY ./migrations /var/www/app/migrations/. +COPY ./public /var/www/app/public/. +COPY ./src /var/www/app/src/. +COPY ./templates /var/www/app/templates/. +COPY ./translations /var/www/app/translations/. +COPY ./vendor /var/www/app/vendor/. + +COPY ./.env /var/www/app/.env + +# import the manifest.json file +COPY ./public/build/manifest.json /var/www/app/public/build/manifest.json + +ADD ./entrypoint.sh /. + +RUN chmod +x /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] ENV PHP_FPM_USER=www-data \ PHP_FPM_GROUP=www-data \