Public | Automated Build

Last pushed: 10 months ago
Short Description
Apache and PHP for drupal.
Full Description

Docker Apache for Drupal

Apache 2 and PHP-fpm configured for Drupal, with

Tags:

  • latest, php-7.1.x - Latest 7.1 from ppa:ondrej
  • php-7.0.x - Latest 7.0 from ppa:ondrej
  • php-5.6.x - Latest 5.6 from ppa:ondrej
  • php-5.5.x - Latest 5.5 from ppa:ondrej

See Drupal Development with Docker Compose | Chapter Three.

Build

Extend this container as needed, with a Dockerfile

FROM tbfisher/drupal-apache:php-5.6.x

# Configure files directory.
RUN mkdir -p /var/www_files/public && \
    mkdir -p /var/www_files/private && \
    chown -R www-data:www-data /var/www_files

Use docker compose:

version: '2'
services:

  database:
    image: mariadb:5.5
    networks:
      - backend

  mail:
    image: mailhog/mailhog
    networks:
      - backend

  web:
    build: ../my-drupal-apache
    ports:
      - "22"
    volumes:
      - "./code:/var/www:rw"
      - "files_public:/var/www_files/public:rw"
      - "files_private:/var/www_files/private:rw"
      - "ssh:/root/.ssh:rw"
    networks:
      - backend

networks:
  backend:
    driver: bridge

volumes:
  database:
    driver: local
  files_public:
    driver: local
  files_private:
    driver: local
  ssh:
    driver: local

Note PHP in this build is configured to send mail to a mailhog container, which captures any outgoing mail and exposes a UI on port 8025.

Docker Pull Command
Owner
tbfisher
Source Repository