Skip to content
Demo app for my blog post on multistage-dockerfiles and python virtualenvs
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
static
templates
.gitignore
Dockerfile
Dockerfile-full
Dockerfile-pipenv
LICENSE
Pipfile
Pipfile.lock
README.md
app.py
docker-compose.yml
requirements.txt

README.md

Multistage Docker and Virtualenv Demo

Demo app for my blog post on multistage-dockerfiles and python virtualenvs.

Getting started

Have Docker and Docker Compose installed and then simply run:

$ docker-compose up app

This will build the docker image and start the server. So far the service is very simple, but should give you a starting point. See the Responder docs if you'd like to play around more with that. I think it's quite an interesting project.

I've also included a Pipfile and Pipfile.lock if you'd like to use pipenv instead. To use that with the default setup change your command to:

$ docker-compose up app-pipenv

There is also the Dockerfile-full, which is an example of the result of not using multi-stage builds for your python environment. Build that with the following command and then you can compare for yourself:

$ docker-compose up app-full
You can’t perform that action at this time.