Contao 3.5.X – PHP 7.2 Docker Image for Modul Development

1. Create a empty Folders data and database.

2. Create docker-compose.yml

version: '3'
services:
  php:
    build:
      context: .
      dockerfile: Dockerfile
    volumes:
      - ./data:/var/www/html/
    depends_on:
      - db
    ports:
      - "3333:80"
  db:
    image: mysql:5.7
    environment:
      MYSQL_ROOT_PASSWORD: my_secret_pw_shh
      MYSQL_DATABASE: test_db
      MYSQL_USER: devuser
      MYSQL_PASSWORD: devpass
      MYSQL_ROOT_HOST: '%'
    restart: always
    ports:
      - "9906:3306"
    volumes:
      - ./database:/var/lib/mysql

volumes:
  db:
    driver: local
Continue reading “Contao 3.5.X – PHP 7.2 Docker Image for Modul Development”