Created
November 10, 2018 14:30
-
-
Save manishmore/b27fbf53cbe746c8de2e7f34d519032a to your computer and use it in GitHub Desktop.
Install Drupal through the Docker Composer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is the docker command to launch a MySQL 5.7 container, name it "DrupalMysql", set a | |
few environment variables, expose the MySQL port 3306 as 3308 on the local host and daemonise it: | |
docker run \ | |
--name DrupalMysql \ | |
-e MYSQL_ROOT_PASSWORD=my-secret-pw \ | |
-e MYSQL_DATABASE=drupal \ | |
-e MYSQL_USER=drupal \ | |
-e MYSQL_PASSWORD=drupal \ | |
-p 3308:3306 \ | |
-d \ | |
mysql:5.7 | |
Here is the docker command to launch Drupal 8 in a "Drupal8" container, link it to the previous container's MySQL port, | |
expose it's web port 80 as 8010 on the local host and daemonise it: | |
docker run \ | |
--name Drupal8 \ | |
--link DrupalMysql:mysql \ | |
-p 8010:80 \ | |
-d \ | |
drupal:8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment