Using MySQL with Docker

Regarding virtualization I am a LXC guy.
Nevertheless Docker has won a lot of attention and I would like to show how to use MySQL with Docker.

What is Docker?

In fact Docker is a wrapper around LXC. It is fun to use. Docker has the philosophy
to virtualize single applications using LXC. So in our example we are going to start a mysqld in a chroot environment
encapsulated in his own Namespaces. (You can even set Cgroups resources.)
One of the main points regarding Docker is the usage of a union filesystem (aufs). So when you start a
Docker Container it gets his aufs mount and only changed data is written down.

Aufs is great for a lot of applications and sufficient for Database testing.
I just want to share a simple - more educational, than effective - Dockerfile.
Dockerfiles are the buildscripts for the Docker images.