moby/integration-cli
Cory Snider 6de52a29a8
daemon: support other containerd runtimes (MVP)
Contrary to popular belief, the OCI Runtime specification does not
specify the command-line API for runtimes. Looking at containerd's
architecture from the lens of the OCI Runtime spec, the _shim_ is the
OCI Runtime and runC is "just" an implementation detail of the
io.containerd.runc.v2 runtime. When one configures a non-default runtime
in Docker, what they're really doing is instructing Docker to create
containers using the io.containerd.runc.v2 runtime with a configuration
option telling the runtime that the runC binary is at some non-default
path. Consequently, only OCI runtimes which are compatible with the
io.containerd.runc.v2 shim, such as crun, can be used in this manner.
Other OCI runtimes, including kata-containers v2, come with their own
containerd shim and are not compatible with io.containerd.runc.v2.
As Docker has not historically provided a way to select a non-default
runtime which requires its own shim, runtimes such as kata-containers v2
could not be used with Docker.

Allow other containerd shims to be used with Docker; no daemon
configuration required. If the daemon is instructed to create a
container with a runtime name which does not match any of the configured
or stock runtimes, it passes the name along to containerd verbatim. A
user can start a container with the kata-containers runtime, for
example, simply by calling

    docker run --runtime io.containerd.kata.v2

Runtime names which containerd would interpret as a path to an arbitrary
binary are disallowed. While handy for development and testing it is not
strictly necessary and would allow anyone with Engine API access to
trivially execute any binary on the host as root, so we have decided it
would be safest for our users if it was not allowed.

It is not yet possible to set an alternative containerd shim as the
default runtime; it can only be configured per-container.

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit 547da0d575)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-29 20:36:50 +02:00
..
checker bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
cli TestPushMultipleTags: Add support for 20.10 CLI 2021-03-18 19:26:17 +00:00
daemon integration-cli: remove some redundant fmt.Sprintf()'s 2022-02-15 12:50:21 +01:00
environment testutil: make testing packages public 2019-09-11 07:47:23 -05:00
fixtures integration-cli: fix test rogue certs 2022-05-19 10:54:31 +02:00
requirement integration-cli: make testRequires() a Helper 2019-10-09 21:44:22 +02:00
testdata Clean some integration-cli/fixtures package/files 2018-04-16 10:48:58 +02:00
benchmark_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
check_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
daemon_swarm_hack_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_api_attach_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_api_build_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_api_build_windows_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_api_containers_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_api_containers_unix_test.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
docker_api_containers_windows_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_api_exec_resize_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_api_exec_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_api_images_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_api_inspect_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_api_logs_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_api_network_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_api_stats_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_api_swarm_node_test.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
docker_api_swarm_service_test.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
docker_api_swarm_test.go Bump swarmkit to v2 2022-04-21 17:33:07 -04:00
docker_api_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_attach_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_attach_unix_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_build_test.go fix some minor linting issues 2022-07-04 10:15:28 +02:00
docker_cli_build_unix_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_by_digest_test.go remove unneeded "digest" alias for "go-digest" 2022-03-04 14:49:42 +01:00
docker_cli_commit_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_cp_from_container_test.go gofmt GoDoc comments with go1.19 2022-07-13 22:42:29 +02:00
docker_cli_cp_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_cp_to_container_test.go gofmt GoDoc comments with go1.19 2022-07-13 22:42:29 +02:00
docker_cli_cp_to_container_unix_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_cp_utils_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
docker_cli_create_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_daemon_plugins_test.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
docker_cli_daemon_test.go daemon: support other containerd runtimes (MVP) 2022-07-29 20:36:50 +02:00
docker_cli_events_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_events_unix_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_exec_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_exec_unix_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_external_volume_driver_test.go gofmt GoDoc comments with go1.19 2022-07-13 22:42:29 +02:00
docker_cli_health_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_history_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_images_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_import_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_info_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_info_unix_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_inspect_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_links_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_login_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_logout_test.go test: use T.Setenv to set env vars in tests 2022-04-23 17:44:16 +08:00
docker_cli_logs_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_netmode_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_network_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_network_unix_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_plugins_logdriver_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_plugins_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_port_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_proxy_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_prune_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_prune_unix_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_ps_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_pull_local_test.go test: use T.Setenv to set env vars in tests 2022-04-23 17:44:16 +08:00
docker_cli_pull_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_push_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_registry_user_agent_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
docker_cli_restart_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_rmi_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_run_test.go Merge pull request #43682 from crazy-max/split-test-suites 2022-06-22 23:22:43 +02:00
docker_cli_run_unix_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_save_load_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_save_load_unix_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_search_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_service_create_test.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
docker_cli_service_health_test.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
docker_cli_service_logs_test.go Merge pull request #42155 from Snorch/integration-cli-fix-race-in-TestServiceLogsFollow 2022-06-30 11:39:32 -07:00
docker_cli_service_scale_test.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
docker_cli_sni_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_start_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_stats_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_swarm_test.go Bump swarmkit to v2 2022-04-21 17:33:07 -04:00
docker_cli_swarm_unix_test.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
docker_cli_top_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_update_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_update_unix_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_cli_userns_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
docker_cli_v2_only_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
docker_cli_volume_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_deprecated_api_v124_test.go integration-cli: split DockerSuite into subsequent build suites 2022-06-17 10:59:04 +02:00
docker_deprecated_api_v124_unix_test.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
docker_hub_pull_suite_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
docker_utils_test.go integration-cli: remove some redundant fmt.Sprintf()'s 2022-02-15 12:50:21 +01:00
events_utils_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
fixtures_linux_daemon_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
requirements_test.go some cleaning up of isolation checks, and platform information 2022-02-18 22:58:37 +01:00
requirements_unix_test.go Remove "seccomp" build tag 2022-05-12 14:48:35 -07:00
test_vars_test.go Remove deprecated environment.DaemonPlatform() 2018-01-15 15:32:06 +01:00
test_vars_unix_test.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
test_vars_windows_test.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
utils_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00