Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Docker Tutorial Prereqs

For the Containerizing PHP Applications tutorial, if you'd like to follow along, you'll need a working Docker install on your laptop. I'll be using Docker version 1.12, though the versions aren't particularly important for basic concepts.

For Mac users: I strongly recommend you install Docker for Mac ( Docker Toolbox or Docker Machine will work, but they are more complicated and Docker for Mac is the officially recommended way to run Docker on macOS.

For Windows users: I don't have much experience running Docker on Windows, but the new Docker for Windows looks promising, and should be more transparent than using Docker Machine. It does require Windows 10 to work.

For Linux users: Install Docker via the appropriate package manager for your OS.

We will also be using Docker Compose. Docker for Mac and Docker for Windows include a proper version of Docker Compose out of the box. Linux users may need to install a separate package for this.

To make sure your Docker environment is working, run the following commands:

>$ docker-compose -v
docker-compose version 1.8.0, build f3628c7
>$ docker version

 Version:      1.12.1
 API version:  1.24
 Go version:   go1.7.1
 Git commit:   6f9534c
 Built:        Thu Sep  8 10:31:18 2016
 OS/Arch:      darwin/amd64

 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:        Thu Aug 18 17:52:38 2016
 OS/Arch:      linux/amd64
>$ docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker Hub account:
For more examples and ideas, visit:

If all that appears to be working successfully for you, you're good to go. We'll be working through examples with Wordpress, Drupal, and raw PHP code. It would save time for you to have a zip file of the latest versions of Wordpress and Drupal already downloaded to work with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.