chill-skeleton-basic/Dockerfile

95 lines
2.4 KiB
Docker
Raw Normal View History

FROM php:8.2-fpm-alpine AS chill_base_php82
2022-07-11 17:27:00 +00:00
ENV POSTGRES_VERSION 14
# default UID for the PHP user
ARG UID=1000
ARG GID=1000
# install php extensions and deps
RUN apk update && apk add --no-cache \
wget gnupg \
libpq-dev \
icu-dev \
oniguruma-dev \
libzip-dev \
linux-headers \
gcc g++ make autoconf \
bash git \
&& docker-php-ext-install pdo_pgsql intl mbstring zip bcmath exif sockets \
&& git clone https://github.com/nikic/php-ast.git \
&& cd php-ast \
&& phpize \
&& ./configure \
&& make install \
&& echo 'extension=ast.so' > /usr/local/etc/php/php.ini \
&& cd .. && rm -rf php-ast \
&& pecl install redis \
&& docker-php-ext-enable redis \
&& apk add libpng-dev libjpeg-turbo-dev freetype-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd \
&& apk del wget gnupg g++ icu-dev libzip-dev
2023-02-01 10:36:45 +00:00
RUN apk add postgresql${POSTGRES_VERSION}-client
RUN apk del oniguruma-dev linux-headers gcc 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
#
#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"]
2022-07-11 17:27:00 +00:00
ENV PHP_FPM_USER=www-data \
PHP_FPM_GROUP=www-data \
COMPOSER_HOME=/var/www/app/.composer \
SESSION_LIFETIME=10800
CMD [ "php-fpm" ]