Reputation: 5998
when I try to pull a docker image to a machine (which I am not a sudo on), I am getting an error
failed to register layer: ApplyLayer exit status 1 stdout: stderr: Container ID 110088952 cannot be mapped to a host ID.
I found a trouble-shooting page that says this error is the usernamespace feature is turned on and it requires that the container id must be between 0 and 65536. I checked with docker info
and it does appear to be on:
Security Options:
userns
My question is: how do i get around this issue? I have no idea how to make sure the "container ids are in the range 0 and 65536"... They suggest turning on namespaces on the computer I build the image on, but the command they suggest does not work on my mac:
$ sudo docker daemon --userns-remap=default
docker: 'daemon' is not a docker command.
See 'docker --help'.
Upvotes: 4
Views: 4585
Reputation: 5037
Not sure if that's the right way to go but I managed to do that by changing the /etc/subgid
and etc/subuid
helped me - if you specify default
in userns-remap
it would create a user called dockremap
and automatically add records to /etc/subgid
and /etc/subgid
.
Read more about it here but it's important that the container ID would be in the valid uid range. if not - change the range.
Upvotes: 2
Reputation: 1223
Maybe it is not docker daemon ...
but dockerd ...
? Don't forget to kill dockerd
first, before you launch your commands.
Upvotes: 0