- Copy
example.docker-compose.yml
todocker-compose.yml
. - Adjust the environment settings (e.g.
MYSQL_DATABASE
) as necessary.
Run docker-compose up
- Get the name of the Drupal container:
$ docker ps
- SSH to the container:
$ docker exec -it <container-name> /bin/bash
- Once inside the container, you should see yourself inside the
/var/www/html
directory. - Install dependencies using
composer
:$ composer install
- Install Drupal using
drush
:$ ./vendor/bin/drush si standard --site-name="My Drupal 8 site"
You can access the site by going to http://localhost:8080