A container's desired state inside a pod.
The OCI image config supplies defaults; these fields override it (see
Tank.OCI): command overrides the image Entrypoint and args overrides
Cmd — and as in Docker, setting command resets Cmd. env is merged over
the image Env; working_dir and user override the image's, with user
resolved against the rootfs's /etc/passwd and /etc/group.
image— an OCI reference ("nginx:1.27") or the{:rootfs, path}escape hatch (an already-assembled rootfs directory).mounts—Tank.Mounts, each naming a pod-levelTank.Volume.limits— a map of cgroup limits::memory(bytes),:pids,:cpu({quota_us, period_us}).tty— whentrue, the container's main process runs on a PTY (rather than/dev/null), soTank.attach/1can take over its terminal. Use it for a container that is an interactive shell. Defaultfalse.
Not the runtime
This is the desired-state struct. The supervised GenServer that brings a
container to life is Tank.Runtime.
Summary
Functions
Build a validated container from a map or keyword list.
Like new/1 but raises ArgumentError on invalid input.