Docker guidelinesΒΆ
Docker ComposeΒΆ
All Docker projects must contain a Docker Compose file.
TimezoneΒΆ
To match our local time, all containers should define TZ=Europe/Zurich
.
Health checksΒΆ
Since marvinCI, and Traefik proxy will leverage health checks, the following rules apply:
All Docker Base images must contain health checks
All Docker containers must contain health checks
Important
The Proxy will not route / forward requests to the Docker container, when the container is not in a healthy
state.
ResourcesΒΆ
To avoid containers using too much resources, they should be CPU-, and memory-limited.
For our βοΈ Services, the containers should also contain reservations to avoid over-comitting on our servers.
Hint
Resources can be set via the resources attribute of a Docker Compose file.
As an example, check out our infrastructure services, or use the following snippet:
---
services:
example:
deploy:
resources:
limits:
cpus: '1'
memory: '128M'
reservations:
cpus: '0.1'
memory: '32M'