Part 2

Wordpress

Next we'll setup Wordpress that requires MySQL and persisted volume.

In https://hub.docker.com/_/wordpress/ there is a massive list of different variants in Supported tags and respective Dockerfile links - most likely for this testing we can use any of the images. From "How to use this image" we can see that all variants require WORDPRESS_DB_HOST that needs to be MySQL.So before moving forward, let's setup that.

We can inspect the changes that happened in the image and ensure that no extra meaningful files got written to the container:

$ docker compose ps
  NAME                    COMMAND                  SERVICE             STATUS              PORTS
  wordpress-db-1          "docker-entrypoint.s…"   db                  running             33060/tcp
  wordpress-wordpress-1   "docker-entrypoint.s…"   wordpress           running             0.0.0.0:9999->80/tcp

$ docker diff wordpress-wordpress-1
  C /run
  C /run/apache2
  A /run/apache2/apache2.pid
You have reached the end of this section!