Clone repo using https:
git clone https://github.com/francoislamiedepain/containerized-wordpress.git
Clone repo using ssh:
git clone [email protected]:francoislamiedepain/containerized-wordpress.git
Please follow official documentation: https://docs.docker.com/compose/install/#install-compose
- Change into cloned repository :
cd containerized-wordpress/
Run docker-compose up in detached mode, it will pull the needed Docker images, and starts the wordpress/database containers.
docker-compose up -d
You should now have 2 containers running on your machine:
francoishamy@fha containerized-wordpress (main) $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e58386435152 wordpress:5.7.2 "docker-entrypoint.s…" 53 minutes ago Up 53 minutes 0.0.0.0:8000->80/tcp containerized-wordpress_wordpress_1
df1123c8daa0 mysql:8.0 "docker-entrypoint.s…" 53 minutes ago Up 53 minutes 3306/tcp, 33060/tcp containerized-wordpress_db_1
In your browser, check wordpress running using 0.0.0.0:8000 (or 443 depends on your configuration).
WordPress works only on ports 80 and/or 44. If you encounter about binding your IP adress to port, please check listening port on your machine.
francoishamy@fha containerized-wordpress (main) $ lsof -i -P -n