Open aaclarker opened 5 years ago
Work around would be to put docker-init into /sbin/docker-init.
The root cause seems to be that we bind-mount in docker-init to /sbin but the mount for that is done before user specified bind mounts.
I started getting exactly the same issue just within the past week. Yes, copying /usr/bin/docker-init to /sbin/docker-init does solve the problem, but the question is: why did this issue just start happening now when I have had the same config for months?
It's because of this change: https://github.com/moby/moby/commit/bcacbf523b35b6cf22bd84ac33e4425784c5a0a2
Thanks for the update @cpuguy83! That's exactly the issue. I realize a couple of workarounds exist, but is there any chance this will be considered a bug and fixed in an upcoming release?
@kolyshkin WDYT, re: fixing this in a patch release?
I think we could add the mount for docker-init
to the oci spec after all the bind mounts and volumes are added.
Do you see any possible breakages here?
@cpuguy83's workaround did the trick.
Expected behavior
The Amazon Web Services ECS Container Agent, in some modes, requires the
--init
flag as well as mounting of/sbin
.The ECS Agent container example given in their documentation should start and does so on Docker CE 18
Actual behavior
Attempting to run the container with both
--init
and--volume=/sbin:/sbin
options immediately fails with the error:Steps to reproduce the behavior
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.)
Tested on RHEL 7.6 in AWS using the latest Docker CE stable from yum as of 7/25/19.
Start the ECS Agent container using most flags from the example: