A minimal example for a Docker container and how to deploy it
https://minimal-docker.fsfe.org
Irakli Maisuradze
b9c09b4e3f
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #23 |
||
---|---|---|
docs | ||
LICENSES | ||
.drone.yml | ||
docker-compose.yml | ||
Dockerfile | ||
README.md | ||
renovate.json | ||
renovate.json.license | ||
webserver.py |
Minimal Docker example
This repo contains a rather minimalistic example of how a Docker service can look like in our infrastructure. It also shows how it's deployed via Drone.
It complements the technical documentation on Docker deployments for the FSFE System Hackers.
Important files
.drone.yml
is picked up by our Drone CI, and executes the listed steps:- Check REUSE compliance
- Run docker-compose to deploy the Docker container as defined, and only in defined events
- On a defined docker host
- For a rootless Docker environment
docker-compose.yml
defines which containers are going to be started, and how they are described.- In this example very simple: building a Docker image based on the
Dockerfile
- It also exposes ports to the host and sets labels that allow our reverse proxy to channel incoming requests to the container
- In this example very simple: building a Docker image based on the
Dockerfile
defines the layers of the Docker imageminimaldocker
that will be deployed.- Based on a well-maintained Python image
- Running a very simple webserver that echoes HTTP requests