I want to be able to create and run a drupal site locally under macOS (Catalina) inside Docker. I’m totally confused how to get everything I need all together: druapl, drush, mysql, and composer. Different sources seem to give only pieces of the process and are often impenetrable to me.
For example, https://blog.chrismitchellonline.com/posts/local-drupal-docker/ gives clear instructions to use a Terminal command such as:
docker pull drupal:8.9.2-apache
(That’s a more recent version than the blog uses.)
But then it says the next step is: Create a new Dockerfile and use the new Drupal image drupal:8.9.2-apache in the FROM instruction:
FROM drupal:8.9.2-apache
But where and how does one create that Dockerfile that includes that FROM
instruction? Does anything else need to go into that Dockerfile?
Here’s what I’ve already done:
-
Installed Docker Desktop for Mac (version 23).
-
Executed
docker pull drupal:8.9.2-apache
.
Questions:
-
Exactly what do I do next?
-
The remaining instructions in the referenced blog tell how to install composer and drush. But how do I get mysql, which I’ll use for drupal?