Skip to main content

Introduction

In order to install a WordPress development environment on Docker, you'll need to install Docker and use docker-compose.

After adding those files, from your terminal, run the following command

docker-compose up -d

This will build a Docker container and image with the specified settings from the .yml file in the detached state.

You can see if the containers are running by typing

docker ps --all

You should see something like

CONTAINER ID    IMAGE                     COMMAND                  CREATED         STATUS         PORTS                                   NAMES
353c53e7721b nginx "nginx -g 'daemon of…" 8 seconds ago Up 5 seconds 0.0.0.0:8010->80/tcp wp-docker-nginx
8cf9f52c0540 wordpress:5.1.1-fpm "docker-entrypoint.s…" 9 seconds ago Up 7 seconds 80/tcp, 9000/tcp wp-docker-app
e1f1d0799b40 mysql:5.7 "docker-entrypoint.s…" 10 seconds ago Up 8 seconds 33060/tcp, 0.0.0.0:33066->3306/tcp wp-docker-db
352d5f6f64a9 phpmyadmin/phpmyadmin "/run.sh supervisord…" 10 seconds ago Up 8 seconds 9000/tcp, 0.0.0.0:8181->80/tcp wp-docker-phpmyadmin

Your project will be available on https://your.custom.url.test:8443.