Security defaults
The enclave applies hardened defaults to every container, so the attested config honestly reflects what runs. These differ from stock Docker, so a container that relied on Docker’s permissive defaults may need adjustment.The most common migration surprises are the read-only root filesystem and dropped capabilities. If your app writes to its root filesystem, set
read_only: false or add a tmpfs mount for its scratch directories. If it needs a capability (for example SYS_ADMIN for sandboxing, or NET_RAW for ping), list it under cap_add./tinfoil mount contains:
Healthchecks
Add ahealthcheck block to a container to have the enclave verify it’s actually ready before the deployment transitions to Running. Without one, the container is considered ready the moment Docker starts it — fine for fast-starting apps, but a problem for workloads with long startup (model loading, cache warm-up) where the process is up but isn’t serving yet.
How it’s used during boot. The enclave’s boot process polls Docker’s health state every 5 seconds once the container starts and waits until Docker reports the container
Healthy before finishing boot. If Docker reports Unhealthy (i.e. retries consecutive failures after start_period has elapsed), the deployment fails and the last healthcheck output is surfaced as the error detail.
The test command runs inside the container, so whatever you invoke (curl, wget, a language runtime) has to be available in the image. For an inference server like vLLM that already exposes /health, a curl -sf http://localhost:<port>/health check is idiomatic.
See also. The schema is taken from Docker Compose — see the Compose healthcheck reference for the full semantics (exit codes, CMD-SHELL vs CMD, disabling an inherited check with disable: true).
Restart policy
By default, a container whose process exits stays exited. Setrestart to have Docker automatically restart the process if it crashes — useful for long-running servers that should stay up across transient failures.
Interaction with healthchecks. The restart policy fires when the container process exits — it has no effect when Docker marks the container
Unhealthy (the process keeps running; only its health state changes). During boot, the enclave fails the deployment on Unhealthy regardless of restart. Once the container has been declared Healthy, restart governs what happens if the process later dies.
See also. Taken from Docker Compose — see the Compose restart reference.
