MiB
MiB

Reputation: 143

dockerd --add-runtime vs. docker-container --runtime

What is the difference between setting --add-runtime to dockerd and --runtime to docker-container? Should I define --runtime for manually run docker-container when using also dockerd or will dockerd take care of picking right runtime?

Upvotes: 0

Views: 911

Answers (1)

xuchenCN
xuchenCN

Reputation: 19

Container State

Option 1: Included

The last used runtime would be stored on disk within the container config (the whole tuple :). Meaning, the next time the container is started without a --add-runtime argument, the old value would be used.

In the case where the runtime is no longer registered with the daemon, an error shall be displayed so the user can correctly specify a correct runtime.

This option would also allow to specify this flag at container creation instead (i.e. docker create) to be used as the default every time a container get started.

Option 2: Not Included

If we choose not to persist that choice on the disk, a next start of the container would revert to the default runtime if no runtime is specified

Detail : https://github.com/moby/moby/issues/22845

Upvotes: 1

Related Questions