Commit bb790256 authored by Manuel Christlieb's avatar Manuel Christlieb

feat(): Add PHP 7.4 container tag

parent 85a10f95
Pipeline #28296 failed with stage
in 8 minutes and 12 seconds
......@@ -19,6 +19,14 @@ build73:
stage: build
only:
refs:
- master
- master
script:
- /bin/sh build.sh 7.3
build74:
stage: build
only:
refs:
- master
script:
- /bin/sh build.sh 7.3 latest
- /bin/sh build.sh 7.4 latest
FROM php:7.4-fpm-buster
# Add php.ini for more dev-specific PHP configuration
COPY shared/php.ini /usr/local/etc/php/
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# pool configuration
COPY shared/zz-www.conf /usr/local/etc/php-fpm.d/
# Add backports to sources.list
RUN echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list
# Install packages with clean up
RUN set -ex; \
build_dependencies="autoconf dpkg-dev file g++ gcc make pkgconf re2c libcurl4-nss-dev \
libjpeg-dev libpng-dev libpq-dev libjpeg62-turbo-dev libxml2-dev \
libxslt1-dev libfreetype6-dev libmagickwand-dev"; \
install_packages="acl cron gifsicle git ssmtp imagemagick graphicsmagick gsfonts jpegoptim libjpeg-turbo-progs \
libpq5 libxml2 libxslt1.1 libzip-dev mariadb-client nano patch pkg-config procps openssl openssh-client \
optipng rsync sudo unzip vim webp zip"; \
apt-get update; \
apt-get install -y --no-install-recommends ${build_dependencies}; \
apt-get install -y ${install_packages}; \
apt-get -t stretch-backports install -y libsodium-dev; \
pecl install xdebug redis imagick mongodb; \
docker-php-ext-enable imagick; \
docker-php-ext-enable redis; \
docker-php-ext-enable mongodb; \
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr --with-freetype-dir=/usr/; \
docker-php-ext-install -j "$(nproc)" \
bcmath \
calendar \
curl \
pcntl \
gd \
mysqli \
opcache \
pdo_mysql \
pdo_pgsql \
soap \
exif \
mbstring \
intl \
xsl \
zip \
sodium \
; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${build_dependencies}; \
rm -rf /var/lib/apt/lists/*; \
chmod 777 /tmp
# Allow user www-data to run the xdebug enable script
RUN echo 'www-data ALL=(root) NOPASSWD:/usr/local/bin/team23-docker-php-enable-xdebug.sh' >> /etc/sudoers
# Add composer package for running composer downloads parallel
RUN composer global require hirak/prestissimo
# Install deployer
RUN curl -LO https://deployer.org/deployer.phar && mv deployer.phar /usr/local/bin/dep && chmod +x /usr/local/bin/dep
# Configure ssmtp to use mail:1025 as a smtp server and php to use ssmtp as sendmail_path
RUN echo "mailhub=mail:1025\nUseTLS=NO\nFromLineOverride=YES" > /etc/ssmtp/ssmtp.conf && \
echo "sendmail_path = /usr/sbin/ssmtp -t" > /usr/local/etc/php/conf.d/sendmail.ini
# Enable our own entrypoint which can be used to install/enable xdebug using env variables
COPY shared/team23-docker-php-enable-xdebug.sh shared/team23-docker-php-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["team23-docker-php-entrypoint.sh"]
# This has to be here again as ENTRYPOINT seems to reset CMD
CMD ["php-fpm"]
# Finally switch to our standard workdir
WORKDIR /app/web/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment