Verified Commit 8b2385b7 authored by Christoph Böhner-Figas's avatar Christoph Böhner-Figas
Browse files

Add drupal dependencies and drush.phar

parent 0c0f01fd
Pipeline #10832 passed with stage
in 11 minutes and 52 seconds
......@@ -8,13 +8,72 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Install xdebug
RUN apt-get update && \
apt-get install -y autoconf dpkg dpkg-dev file g++ gcc make pkgconf re2c && \
apt-get install -y --no-install-recommends \
autoconf dpkg dpkg-dev file g++ gcc make pkgconf re2c && \
pecl install xdebug && \
rm -rf /var/lib/apt/lists/*
# TODO: Remove packages again, currently apt will bail out with:
# "WARNING: The following essential packages will be removed.
# This should NOT be done unless you know exactly what you are doing!"
#apt-get remove -y autoconf dpkg dpkg-dev file g++ gcc make pkgconf re2c && \
# Add drupal dependencies
# install the PHP extensions we need
RUN set -ex; \
\
if command -v a2enmod; then \
a2enmod rewrite; \
fi; \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libjpeg-dev \
libpng-dev \
libpq-dev \
; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
docker-php-ext-install -j "$(nproc)" \
gd \
opcache \
pdo_mysql \
pdo_pgsql \
zip \
; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
RUN { \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=60'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.enable_cli=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
# INSTALL DRUSH
# Install Drush 8 with the phar file.
RUN curl -fsSL -o /usr/local/bin/drush "https://github.com/drush-ops/drush/releases/download/8.1.17/drush.phar" && \
chmod +x /usr/local/bin/drush
COPY team23-docker-php-enable-xdebug.sh /usr/local/bin/
# Enable our own entrypoint which can be used to install/enable xdebug using env variables
......
Supports Markdown
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