Skip to content

mikespub-org/docker-quickstart-python

Repository files navigation

quickstart-python

A simple Python app (using Flask) which can easily be deployed to Docker.

This application support the Getting Started with Python on Docker article - check it out.

Running locally

$ git clone https://github.com/mikespub-org/docker-quickstart-python.git
$ cd docker-quickstart-python
$ docker build --tag quickstart-python .
$ docker run -d -p 5080 quickstart-python

Alternatively, you can run the dockerized version:

$ docker run -d -p 5080 mikespub/quickstart-python

Your app should now be running:

curl 192.168.59.103:49153
Hello World!</br>Hostname: ebf2b5258db0</br>Counter: Redis Cache not found, counter disabled.

Deploying with Docker Compose

Install Docker Compose.

$ docker-compose up 

Building with Docker App

Install Docker App.

$ docker app init --compose-file docker-compose.yml python-app
$ ...
$ docker app inspect python-app.dockerapp
$ docker app validate python-app.dockerapp
$ docker app render python-app.dockerapp
$ docker swarm init (if necessary)
$ docker app install python-app.dockerapp --name my-app
$ docker app status my-app
$ docker app bundle python-app.dockerapp
$ docker app push --tag mikespub/python-app:0.1.0

Deploying with Docker App

Install Docker App.

$ docker app inspect mikespub/python-app:latest
$ docker app install mikespub/python-app:latest

Continue with this tutorial here.