No need for VirtualBox or Vagrant!
All that is needed is the Docker Mac/Windows desktop client.
Installing the desktop client includes Docker-Compose
To use:
git clone https://github.com/bigbassroller/wordpress-docker-compose my-project-name && cd my-project-name
Then:
docker-compose up -d
Wait a moment, as it will take 30 seconds for Docker to install MariaDB and connect the WordPress container to it.
You can see the status of the WordPress container and know when its ready by typing (replace 'my-project-name' with the current working directory or run docker ps
to see the name of the container):
docker logs my-project-name1_wordpress_1 --follow
This will create a wordpress
directory with a local copy of WordPress and env
folder for the MariaDB. Now you will have a local hard copy of your WordPress files and database.
Go to http://localhost:80 to see your brand spanking new WordPress site!
docker kill $(docker ps -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker kill $(docker ps -q) && docker rm $(docker ps -a -q) && docker rmi $(docker images -q) && docker-compose up -d && docker logs wordpress -f