Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (40 sloc) 1.62 KB
FROM drupal:8.5-apache
RUN apt-get update && apt-get install -y \
git \
imagemagick \
libmagickwand-dev \
mariadb-client \
rsync \
sudo \
unzip \
vim \
wget \
&& docker-php-ext-install mysqli \
&& docker-php-ext-install pdo \
&& docker-php-ext-install pdo_mysql
# Remove the memory limit for the CLI only.
RUN echo 'memory_limit = -1' > /usr/local/etc/php/php-cli.ini
# Remove the vanilla Drupal project that comes with this image.
RUN rm -rf ..?* .[!.]* *
# Change docroot since we use Composer Drupal project.
RUN sed -ri -e 's!/var/www/html!/var/www/html/web!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www!/var/www/html/web!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
# Install composer.
RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/fe44bd5b10b89fbe7e7fc70e99e5d1a344a683dd/web/installer -O - -q | php -- --quiet
RUN mv composer.phar /usr/local/bin/composer
# Put a turbo on composer.
RUN composer global require hirak/prestissimo
# Install XDebug.
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug
# Install Robo CI.
RUN wget https://robo.li/robo.phar
RUN chmod +x robo.phar && mv robo.phar /usr/local/bin/robo
# Install Dockerize.
ENV DOCKERIZE_VERSION v0.6.0
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
# Install ImageMagic to take screenshots.
RUN pecl install imagick \
&& docker-php-ext-enable imagick