Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

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.


Implementation of the Docker "getting started" tutorial






No releases published


No packages published