Files
docker-cli/components/engine/daemon
Antonio Murdaca 89de8e187c daemon: honor default runtime when starting containers
If you created containers from pre-OCI docker (e.g. docker-1.10.x)
upgrade may fail when restarting containers if the new docker daemon
has `--default-runtime` set.

In Fedora, we ship docker 1.12.6 with:

```
--default-runtime=oci
--add-runtime oci=/usr/libexec/docker/docker-runc-current
```

That way we don't rely on `docker-runc` being in `$PATH`.

The issue is, on upgrade from docker 1.10.3 without this patch, the
default runtime in `daemon/start_linux.go` is unconditionally set to
`runc=docker-runc` without honoring the `--default-runtime` flag set in
the docker daemon.

Reproducer:

- (1.10.3) `docker run -d -p 5000:5000 --restart=always --name registry
registry:2`
- upgrade to docker 1.12.6 (1.11.x has likely the same issue)
- the registry container fails to restart on upgrade with the following
log message `error="exec: \"docker-runc\": executable file not
found in $PATH: \"\""`

That error comes from the fact that we're setting the runtime in the
container's HostConfig to `runc` where instead we should have honored
the `--default-runtime` flag (in our case that's set to `oci`).

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 9391a822ea4bee60284b4b2eb3a6535e20492569
Component: engine
2017-01-12 20:36:22 +01:00
..
2016-12-22 08:38:37 +08:00
2016-11-14 15:15:09 -05:00
2016-09-16 12:27:13 -04:00
2016-09-07 11:05:58 -07:00
2016-10-28 11:06:54 -07:00
2016-12-21 22:42:47 +01:00
2016-10-25 06:43:54 +00:00
2017-01-08 21:32:30 +08:00
2016-11-16 13:38:45 -08:00
2016-12-27 23:30:50 +08:00
2016-12-27 23:30:50 +08:00
2016-11-03 10:05:11 -07:00
2016-11-03 10:05:11 -07:00
2016-11-03 10:05:11 -07:00
2016-11-17 13:10:48 -05:00
2016-11-22 12:49:38 +00:00
2016-09-16 12:27:13 -04:00
2016-09-07 11:05:58 -07:00
2016-09-07 11:05:58 -07:00
2016-11-08 17:41:56 -08:00
2016-10-27 10:34:38 -07:00
2016-10-27 10:34:38 -07:00
2016-10-06 17:12:17 -07:00
2016-09-07 11:05:58 -07:00
2016-10-20 17:06:11 +02:00
2016-06-27 10:23:37 -07:00
2016-12-27 23:30:50 +08:00
2016-12-01 09:38:08 -08:00
2016-12-01 09:38:08 -08:00
2016-12-01 09:38:08 -08:00
2016-12-01 09:38:08 -08:00
2017-01-04 23:29:12 +08:00
2016-10-06 22:48:53 -03:00
2016-09-07 11:05:58 -07:00
2016-12-27 21:46:52 +08:00
2016-10-27 10:34:38 -07:00
2016-11-14 15:15:09 -05:00
2016-09-13 09:55:35 -04:00
2016-12-21 22:42:47 +01:00
2016-12-27 21:46:52 +08:00
2016-12-27 21:46:52 +08:00
2016-09-07 11:05:58 -07:00
2016-09-16 11:56:15 -07:00
2016-09-16 11:56:15 -07:00
2016-09-21 12:36:52 +02:00
2016-09-16 11:56:15 -07:00
2016-11-22 12:49:38 +00:00
2016-12-27 23:30:50 +08:00
2016-09-07 11:05:58 -07:00
2016-09-07 11:05:58 -07:00
2016-11-21 19:56:01 +08:00
2016-11-22 12:49:38 +00:00