Unable to find user root: no matching entries in passwd file in Docker Unable to find user root: no matching entries in passwd file in Docker jenkins jenkins

Unable to find user root: no matching entries in passwd file in Docker


You can use this command to access to the container with root user:

docker exec -u 0 -i -t {container_name_or_hash} /bin/bash

try debug with that. i think the script maybe remove or disable root user.


This issue is caused by a docker engine bug but which is tracked privately, Docker is asking users to restart the engine!

It seems that the bug is likely to be older than two years!

https://success.docker.com/article/ucp-health-checks-fail-unable-to-find-user-nobody-no-matching-entries-in-passwd-file-observed

https://forums.docker.com/t/unable-to-find-user-root-no-matching-entries-in-passwd-file/26545/7

... what can I say, someone is doing his best to get more funding.


Its a Long standing issue, replicated on my old version 1.10.3 to at least 1.17

As mentioned by @sorin the the docker forum says Running docker stop and then docker start fixes the problem but is hardly a long-term solution...

The docker exec -u 0 -i -t {container_name_or_hash} /bin/bash solution also in the same forum post mentioned here by @ObranZoltan might work for you, but does not work for many. See my output below

$ sudo docker exec -u 0 -it berserk_nobel /bin/bash exec: "/bin/bash": stat /bin/bash: input/output error