Skip to content
This repository has been archived by the owner on May 20, 2021. It is now read-only.

Latest commit

 

History

History
5 lines (3 loc) · 520 Bytes

README.md

File metadata and controls

5 lines (3 loc) · 520 Bytes

Python web app Dockerfile

This Python example is just a simple Flask web application powered by Gunicorn. We pass down GIT_SHA as a Docker build arg as a environment variable and expose it as X-App-Version header using an after_request hook in Flask.

The Dockerfile first copies just the requirements.txt file and install this via pip, if we skipped this and just did a COPY . . we'd be missing Docker's caching layers and waiting for a pip install everytime we change something inside our directory.