Application heavily depends on the infrastructure, therefore infrastructure must be considered a part of the project.
FROM php:7.0-fpm-alpine
MAINTAINER drupal-docker
RUN apk add --no-cache --virtual .dd-build-deps libpng-dev libjpeg-turbo-dev postgresql-dev libxml2-dev $PHPIZE_DEPS \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd mbstring pdo_mysql pdo_pgsql zip \
&& docker-php-ext-install opcache bcmath soap \
&& pecl install redis-3.1.1 \
&& docker-php-ext-enable redis \
&& apk add --no-cache libpng libjpeg libpq libxml2 \
&& apk del .dd-build-deps
COPY drupal-*.ini /usr/local/etc/php/conf.d/
FROM php:7.0-fpm-alpine
MAINTAINER drupal-docker
RUN apk add --no-cache --virtual .dd-build-deps libpng-dev libjpeg-turbo-dev postgresql-dev libxml2-dev $PHPIZE_DEPS \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd mbstring pdo_mysql pdo_pgsql zip \
&& docker-php-ext-install opcache bcmath soap \
&& pecl install redis-3.1.1 \
&& docker-php-ext-enable redis \
&& apk add --no-cache libpng libjpeg libpq libxml2 \
&& apk del .dd-build-deps
COPY drupal-*.ini /usr/local/etc/php/conf.d/
FROM drupaldocker/php:7.0-fpm-2.x
MAINTAINER drupal-docker
RUN apk add --no-cache --virtual .dd-build-deps $PHPIZE_DEPS \
&& pecl install xdebug-2.6.0beta1 \
&& docker-php-ext-enable xdebug \
&& apk del .dd-build-deps
COPY drupal-*.ini /usr/local/etc/php/conf.d/
FROM php:7.0-alpine
MAINTAINER drupal-docker
WORKDIR /var/www/html
RUN apk add --no-cache --virtual .dd-build-deps libpng-dev libjpeg-turbo-dev postgresql-dev libxml2-dev $PHPIZE_DEPS \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd mbstring pdo_mysql pdo_pgsql zip \
&& docker-php-ext-install opcache bcmath soap \
&& pecl install redis-3.1.1 \
&& docker-php-ext-enable redis \
&& curl -sS https://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer \
&& curl -L -o drush.phar https://github.com/drush-ops/drush-launcher/releases/download/0.4.2/drush.phar \
&& chmod +x drush.phar \
&& mv drush.phar /usr/local/bin/drush \
&& curl -L -o drupal.phar https://drupalconsole.com/installer \
&& chmod +x drupal.phar \
&& mv drupal.phar /usr/local/bin/drupal \
&& echo "export PATH=~/.composer/vendor/bin:\$PATH" >> ~/.bash_profile \
&& apk add --no-cache sudo git libpng libjpeg libpq libxml2 mysql-client openssh-client rsync patch \
&& apk del .dd-build-deps
COPY drupal-*.ini /usr/local/etc/php/conf.d/
COPY cli/drupal-*.ini /usr/local/etc/php/conf.d/
FROM php:7.0-fpm-alpine
MAINTAINER drupal-docker
RUN apk add --no-cache --virtual .dd-build-deps libpng-dev libjpeg-turbo-dev postgresql-dev libxml2-dev $PHPIZE_DEPS \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd mbstring pdo_mysql pdo_pgsql zip \
&& docker-php-ext-install opcache bcmath soap \
&& pecl install redis-3.1.1 \
&& docker-php-ext-enable redis \
&& apk add --no-cache libpng libjpeg libpq libxml2 \
&& apk del .dd-build-deps
COPY drupal-*.ini /usr/local/etc/php/conf.d/
:latest
:latest
images
version: '3.5'
services:
db:
...
networks:
- back-tier
php:
...
networks:
- back-tier
- front-tier
web:
...
networks:
- front-tier
- reverse-proxy
cli:
...
networks:
- back-tier
networks:
front-tier:
back-tier:
reverse-proxy:
external:
name: my-reverse-proxy
FROM php:7.0-alpine
MAINTAINER drupal-docker
WORKDIR /var/www/html
RUN apk add --no-cache --virtual .dd-build-deps libpng-dev libjpeg-turbo-dev postgresql-dev libxml2-dev $PHPIZE_DEPS && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr && docker-php-ext-install gd mbstring pdo_mysql pdo_pgsql zip && docker-php-ext-install opcache bcmath soap && pecl install redis-3.1.1 && docker-php-ext-enable redis && apk add --no-cache sudo git libpng libjpeg libpq libxml2 mysql-client openssh-client rsync patch && apk del .dd-build-deps
RUN apk add --no-cache nodejs
RUN curl -sS https://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer \
&& curl -L -o drush.phar https://github.com/drush-ops/drush-launcher/releases/download/0.4.2/drush.phar \
&& chmod +x drush.phar \
&& mv drush.phar /usr/local/bin/drush \
&& curl -L -o drupal.phar https://drupalconsole.com/installer \
&& chmod +x drupal.phar \
&& mv drupal.phar /usr/local/bin/drupal \
&& echo "export PATH=~/.composer/vendor/bin:\$PATH" >> ~/.bash_profile
COPY drupal-*.ini /usr/local/etc/php/conf.d/
COPY cli/drupal-*.ini /usr/local/etc/php/conf.d/
FROM nodejs:8-alpine
MAINTAINER yourself
# Add some global extensions if needed
version: '3.5'
services:
phpcli:
image: drupaldocker/php:7.1-cli-2.x
command: /bin/sh
...
nodejs:
image: nodejs:8-alpine
command: cd web/themes/custom/mytheme && npm run-script watch
...
FROM amazeeio/php:7.2-cli-drupal
COPY composer.json composer.lock /app/
COPY scripts /app/scripts
RUN composer install --no-dev
COPY . /app
# Define where the Drupal Root is located
ENV WEBROOT=web
FROM amazeeio/php:7.2-cli-drupal
COPY composer.json composer.lock /app/
COPY scripts /app/scripts
RUN composer install --no-dev
COPY . /app
# Define where the Drupal Root is located
ENV WEBROOT=web
FROM amazeeio/php:7.2-fpm
COPY composer.json composer.lock /app/
COPY scripts /app/scripts
RUN composer install --no-dev
COPY . /app
# Define where the Drupal Root is located
ENV WEBROOT=web
FROM cli_image_we_just_built as cli
FROM amazeeio/php:7.2-fpm
COPY --from=cli /app /app
Nanos gigantum humeris insidentesBernard of Chartres
Standing on the shoulders of giantsBernard of Chartres
:latest