Skip to content
Implementation of the Docker "getting started" tutorial
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Docker Getting Started

This repository is a simple implementation of a Flask-based application following the tutorials in You may also like to read this for a nice introduction to Dockerizing a Flask application:

Please note that these materials were created and tested using MacOS Sierra. Your mileage may vary considerably on Windows.



Assuming the pre-prerequisites are met, then running the application is simple. First update env.rc to change relevant values. The only thing you will definitely need to configure is USER, as this is used as part of the Docker Hub repository tag. This example builds an image and pushes it to Docker Hub so that the deployed swarm can pull it down (at a later point I hope to investigate whether the Docker Machine can pull from the local docker repository).

Second thing is to ensure you are logged into docker hub, substituting the appropriate username which we assume to be the same as the USER setting.

docker login -u username

Next execute the setup script to build the image, construct some docker machines, setup the swarm, and deploy the application:


At the end of the execution, the script will report URLs at which you can reach the Visualizer application, and our deployed Flask application. Note that it may take 30 seconds or more for the application stack to stabilise, and Redis to be available. Repeatedly visiting the application should see the count of visits counting up, and the hostname of the actual application instance that is responding changing.


Service at    :
Visualizer at :

Cleaning up

Cleaning up when finished is straightforward:


This should halt the application and Docker Stack, and the docker machines created for the demonstration.

You can’t perform that action at this time.