Running MySQL in a Docker container is a fairly straight-forward task. In this article, I will take an opportunity to use this task to explain a few basic concepts about how Docker works.
Docker machine
The first step is to create a droplet in DigitalOcean. And then install Docker engine in it. Thankfully, docker-machine
does both with a single command.
docker-machine create --driver digitalocean --digitalocean-access-token <accesstoken> mysql-droplet
We specify the driver as DigitalOcean to create our droplet.…