Submitted by skyred on
While I was mentoring GSoC 2015 Hawk Auth project, we wanted to test the project in D8 sandbox often. Simplytest.me doesn't help here, because Hawk Auth uses Composer Manager to download extenal PHP library. (Another project using this set up is Commerce for D8.) There is an issue of supporting Composer in Simplytest.me queue, but it hasn't been followed up.
Therefore, we tried to use Docker to spin up a new Drupal installation. It was very fast and simple. Below is the documentation:
Step 0: Install Docker
Step 1: Spin up a database
(here we created a docker container called "drupaldb" using "mariadb" image, then we created a database "drupal" and set root password to be "password")
Step 2: Spin up Drupal 8
(here we created a docker container called "d8docker" using "drupal:8.1.8" image, then used port 80 on localhost for access and linked to the database container we just created)
Done. Now, you can open localhost or 127.0.0.1 on your browser to install Drupal into the database. If your localhost port 80 is being used, then you can change this section "80:80" in the above command to something like "1234:80", which will use port 1234 on your localhost.
Step 2.1: if you need to access the terminal of the D8 website container
(once you in, execute "export TERM=xterm" in your terminal for using text editor)
Step 2.2: if you want to read the log
Step 3: Cleaning up
Comments
Noë replied on Permalink
Have you tried...
Have you tried docker-compose, that makes it a breeze to link multiple containers together.
You just write a little YML file, and then you just say "docker-composer up" and you are good to go.
You can see an example here: https://github.com/WiredPea/ddd
Yonas replied on Permalink
Zeus Drupal Hosting Platform
Very neat. Seems like a bit more work than necessary though. You should check out Zeus ( https://www.drupal.org/project/zeus ). It's an easy way to create Drupal sites with just a few clicks.
The NeverGone replied on Permalink
Drupal connection settings
Drupal connection settings:
Database type: MySQL, MariaDB, Percona Server or equivalent
Database name: drupal
Database username: root
Database password: password
Host: drupaldb
Port number: 3306
marcvangend replied on Permalink
database host name
Thank you, that wasn't completely obvious to me, especially the "Host: drupaldb" setting.
yograf replied on Permalink
When installing host name should be druapldb
Host: drupaldb
Thom Toogood replied on Permalink
Kitematic
If you're using kitematic try this image for testing -- https://hub.docker.com/r/8thom/drupal8/
Both drush & drupal console are both preinstalled inside the container so modules can easily be installed.
Hassan Raza replied on Permalink
Drupal 8 installation
Nice, but with Cloudways Drupal installation can be done with just 1-click, more info at: https://www.cloudways.com/en/drupal-cloud-hosting.php
Add new comment