These are the steps to setup the current website in a Docker container:
wget -O- https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose mkdir wordpress cd wordpress
Then create a file fig.yml which contains:
db: image: mysql:5.5 environment: MYSQL_ROOT_PASSWORD: "A VERY STRONG PASSWORD" web: image: wordpress:latest ports: - "80:80" links: - db:mysql EOF
This description takes advantage of a Docker feature to bind together two or more containers: Docker links. We use it to make the WordPress container depends on another container with MySQL 5.5.
docker-compose up command will read fig.yml, download the needed data and deploy the two containers.
Et voilà, the port 80 of the host which runs the container will be forwarded to the port 80 of the WordPress container.