0

I'm trying to deploy some Docker containers. There seems to be 2 major errors popping up:

  1. When attempting to run a container with an existing image on the machine I get this error:
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "devpts" to rootfs at "/dev/pts": mount devpts:/dev/pts (via /proc/self/fd/9), flags: 0xa, data: newinstance,ptmxmode=0666,mode=0620,gid=5: invalid argument: unknown.

Docker version: 26.1.4, build 5650f9b

RunC version 1.1.13

  1. When attempting to pull an image or running a container which requires Docker to pull the image I get an error like this:
failed to register layer: Container ID 42 cannot be mapped to a host ID

Now, these errors started appearing after I enabled user namespace remapping in the Docker daemon.json file using "userns-remap": "rabbitmq" User namespace remapping is required in my usecase as the container UID ad GID otherwise conflicts with permissions for volumes on the host. Example: If userns-remap is not enabled rabbitmq (UID 999) user in container is mapped to consul (UID 999) user on host.

I have tried to google these error's but I have come up short because of my limited knowledge about Docker and Linux in general.

Aksing ChatGPT yielded me that I need to recompile the Linux kernel to enable /dev/pts Extended Attributes and Multiple instances, which I am not certain is the correct fix for this and seems very overkill.

Thus I'm creating this post in hopes of resolving this issue.

1
  • Not entirely sure - some ideas: let Docker generate a user for you "userns-remap": "default", ensure the filesystem on /var/lib/ is not full, try using Podman instead of Docker. It's a drop-in replacement and Podman runs in user space, not as root or as another user. Hope this helps!
    – Sergio M
    Commented Jun 19 at 13:29

0

You must log in to answer this question.

Browse other questions tagged .