Docker Community Forums

Share and learn in the Docker community.

Install Centos in docker: failed to register layer

I’ve successfully run docker for some time now, including installing CentOS 7.4.1708 in the docker running in Ubuntu 16.04 LTS. After suddenly receiving an error during a new build I decided to try to install the newer CentOS 7.5.1804. After that my problem appeared and has just persisted ever since.

I’ve several lines in my dockerfile but just removing all lines except

FROM centos:7.5.1804

I still get the error. I also get the error with the old setup using

FROM centos:7.4.1708

…which used to work without problems.
The error is:

Sending build context to Docker daemon 20.33GB
Step 1/23 : FROM centos:7.5.1804
7.5.1804: Pulling from library/centos
7dc0dca2b151: Extracting [==================================================>] 74.69MB/74.69MB
failed to register layer: Error processing tar file(exit status 1): open /etc/passwd: permission denied

I tried deleting /var/lib/docker and reinstall Docker. The problem still persists. I tried changing the permissions for /var/lib/docker/tmp as has also been suggested in some fora, also without effect. I tried changing the owner of etc/passwd file on the Ubuntu machine to be me, using sudo chown /etc/passwd. Not sure that is enough? Which permissions should this file have? sudo chmod o+rw /etc/passwd
gives a permission denied!!! Any help would be very highly appreciated!

I now solved this issue. McAffee was the bandit. It blocked the etc/passwd file!

1 Like

what do they have to do to prevent McAffee from blocking?

I just installed mcafee and can confirm docker-rootless just stopped working after months, so DEFINITELY the issue. Working on a fix now, incase anyone knows how to tell mcafee to STOP it?