cc-docker/php-fpm/Dockerfile

89 lines
2.2 KiB
Docker
Raw Normal View History

2021-05-19 14:27:44 +02:00
FROM alpine:3.13
LABEL maintainer="Vincent Composieux <vincent.composieux@gmail.com>"
RUN apk add --no-cache \
coreutils \
gettext \
php8-fpm \
php8-ctype \
php8-curl \
php8-dom \
php8-gd \
php8-iconv \
php8-json \
php8-intl \
php8-fileinfo\
php8-mbstring \
php8-opcache \
php8-openssl \
php8-pdo \
php8-pdo_mysql \
php8-mysqli \
php8-xml \
php8-xsl \
php8-zlib \
php8-phar \
php8-tokenizer \
php8-session \
php8-simplexml \
php8-zip \
php8-xmlwriter \
php8-sodium \
php8-pecl-apcu \
php8-ldap \
bash \
make \
git \
curl
RUN curl -sS https://getcomposer.org/installer | tee composer-setup.php \
&& php8 composer-setup.php && rm composer-setup.php* \
&& chmod +x composer.phar && mv composer.phar /usr/bin/composer \
&& ln -s /usr/bin/php8 /usr/local/bin/php
ARG SYMFONY_CLI_VERSION
RUN wget https://github.com/symfony/cli/releases/download/v$SYMFONY_CLI_VERSION/symfony_linux_amd64.gz \
&& gzip -d symfony_linux_amd64.gz \
&& mv symfony_linux_amd64 symfony \
&& chmod +x symfony \
&& mv symfony /usr/local/bin/
RUN apk add --update nodejs npm \
&& npm install --global yarn
2021-06-09 09:53:35 +02:00
RUN mkdir -p /var/lib/job-archive
2021-05-20 09:22:17 +02:00
RUN mkdir -p /var/www/symfony
2021-06-09 09:53:35 +02:00
VOLUME /var/www/symfony /var/lib/job-archive
2021-05-19 15:32:22 +02:00
2021-05-19 14:27:44 +02:00
COPY symfony.ini /etc/php8/conf.d/
COPY symfony.ini /etc/php8/cli/conf.d/
COPY symfony.pool.conf /etc/php8/php-fpm.d/
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
2021-05-19 14:27:44 +02:00
2021-07-16 09:01:46 +02:00
RUN addgroup -S www
RUN adduser -S -D -H -g "php-fpm user" -G www -s /sbin/nologin www
ARG APP_ENVIRONMENT
ENV APP_ENV=${APP_ENVIRONMENT}
2021-05-21 08:08:04 +02:00
ENV APP_SECRET=67d829bf61dc5f87a73fd814e2c9f629
ENV APP_DEBUG=1
2021-05-19 14:27:44 +02:00
ARG INFLUXDB_PASSWORD
ARG INFLUXDB_ADMIN_TOKEN
2021-05-19 14:27:44 +02:00
ARG MYSQL_PASSWORD
ENV INFLUXDB_URL=influxdb://symfony:${INFLUXDB_PASSWORD}@cc-influxdb:8086/ClusterCockpit
ENV INFLUXDB_V2_URL=http://cc-influxdb:8086
2021-08-03 12:03:23 +02:00
ENV REDIS_URL=redis://cc-redis
ENV INFLUXDB_TOKEN=${INFLUXDB_ADMIN_TOKEN}
2021-05-19 14:27:44 +02:00
ENV DATABASE_URL=mysql://symfony:${MYSQL_PASSWORD}@db:3306/ClusterCockpit
ENV CORS_ALLOW_ORIGIN=^https?://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?$
2021-05-21 08:08:04 +02:00
WORKDIR /var/www/symfony
2021-06-09 09:53:35 +02:00
2021-05-19 14:27:44 +02:00
ENTRYPOINT ["/entrypoint.sh"]
2021-06-09 09:53:35 +02:00
CMD ["php-fpm8", "-F"]
EXPOSE 9001