Interview Prep/Docker/Runtime Stack, OCI & Registries

How do `docker run` flags map to the OCI `config.json`?

AdvancedConceptRuntime Stack, OCI & Registries
Answer

dockerd translates flags into an OCI runtime spec: --user becomes process.user, --cap-add becomes process.capabilities, -v becomes mounts, --memory becomes linux.resources.memory.limit, --read-only becomes root.readonly. You can see the bundle for a running container under /run/containerd/io.containerd.runtime.v2.task/moby/<id>/config.json.

All Docker questions Roadmap: Docker & containers

More on Runtime Stack, OCI & Registries