I've just run into the problem of upgrading from app-emulation/docker-17.03 to 17.06 where my containers created in the prior version would not start in the new version. Now the problem is that I can't easily downgrade to 17.03 as this version has been removed from portage and 17.06 is the new stable. All of 17.06, 17.09 and 17.10 exhibit the same behavior. I'm trying to avoid deleting all my containers and redo all my work again.
After some research it seems to be a documented bug that has been fixed in last June/July.
- https://github.com/docker/for-linux/issues/49
- https://github.com/docker/docker-ce/pull/117
- https://github.com/moby/moby/issues/33688
- https://github.com/node-red/node-red-docker/issues/39
Thanks
Update: I've manually downloaded ebuilds required for docker, docker-runc and containerd and reinstalled 17.03, and the issue is still present. Does that mean that the containers themselves are now corrupted? This is puzzling.
The actual error is
Code: Select all
$ docker start wp-db
Error response from daemon: oci runtime error: container with id exists: c63520b696a8eb45c2e755ec8fea8b077feb749c1a9ffe516663206c56109d42
Error: failed to start containers: wp-dbCode: Select all
time="2017-11-15T02:35:59.357605111Z" level=error msg="containerd: start container" error="oci runtime error: container with id exists: c63520b696a8eb45c2e755ec8fea8b077feb749c1a9ffe51666320
6c56109d42\n" id=c63520b696a8eb45c2e755ec8fea8b077feb749c1a9ffe516663206c56109d42
time="2017-11-15T02:35:59.364434785Z" level=error msg="Create container failed with error: oci runtime error: container with id exists: c63520b696a8eb45c2e755ec8fea8b077feb749c1a9ffe51666320
6c56109d42\n"
time="2017-11-15T02:35:59.549463163Z" level=error msg="Handler for POST /v1.27/containers/wp-db/start returned error: oci runtime error: container with id exists: c63520b696a8eb45c2e755ec8fe
a8b077feb749c1a9ffe516663206c56109d42\n"Basically, here's my solution
- Download older ebuilds for the required packages.
- Stop Docker.
- Hard-mask >=app-emulation/docker-17.06, >=app-emulation/docker-runc-1.0.0_rc3, >=app-emulation/containerd-0.2.9
- Install docker-17.03.
- Start Docker.
- Start containers. Start them a second time if they fail the first time.
