nexdrew / rekcod

docker inspect :mag: → docker run :runner:
ISC License
371 stars 32 forks source link

feat: add support for `--runtime` flag #37

Closed nexdrew closed 5 years ago

nexdrew commented 5 years ago

Fixes #36.

This change adds the --runtime flag to the generated docker run command, in order to explicitly support non-default runtimes like nvidia.

Note that no magic is done to determine the default runtime (via /etc/docker/daemon.json or otherwise) - rekcod will now always blindly include the --runtime flag as long as the Runtime field is defined in the docker inspect output.

This means newly generated docker run commands will probably contain --runtime runc from existing containers that did not specify a different runtime.