Commit 407f721f authored by Manuel Christlieb's avatar Manuel Christlieb

feat(): Add php 5.6 container

parent 3576c2d5
Pipeline #28481 failed with stage
in 9 minutes and 6 seconds
......@@ -7,6 +7,14 @@ services:
- build
stage: build
- master
- /bin/sh 5.6
stage: build
FROM php:5.6-fpm-stretch
# 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/
# Install packages with clean up
RUN set -ex; \
build_dependencies="autoconf dpkg-dev file g++ gcc make pkgconf re2c libcurl4-nss-dev \
libxml2-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 \
libbz2-dev libpq5 libxml2 libxslt1.1 mariadb-client nano patch pkg-config procps openssl \
openssh-client optipng rsync sudo unzip vim webp"; \
apt-get update; \
apt-get install -y --no-install-recommends ${build_dependencies}; \
apt-get install -y ${install_packages}; \
pecl install xdebug-2.5.5 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 \
bz2 \
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/' >> /etc/sudoers
# Add composer package for running composer downloads parallel
RUN composer global require hirak/prestissimo
# Install deployer
RUN curl -LO && 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/ shared/ /usr/local/bin/
# 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