3

I'm trying to install the docker daemon as a non-root user. I'm running this on RHEL 7.9.

Steps followed:

  1. Created a non-root user and switched to that user.
  2. Ran curl -fsSL https://get.docker.com/rootless | sh
  3. Set below env variables:

export XDG_RUNTIME_DIR=/home/test/.docker/run; export PATH=/home/test/bin:$PATH; export DOCKER_HOST=unix:///home/test/.docker/run/docker.sock

  1. Finally, when trying to manually start the docker daemon, it's failing with below error:
PATH=/home/test/bin:/sbin:/usr/sbin:$PATH dockerd-rootless.sh

WARN[0000] The host root filesystem is mounted as "". Setting child propagation to "rslave" is not supported.
[rootlesskit:parent] error: failed to setup UID/GID map: newuidmap 666 [0 1003 1 1 296608 65536] failed: newuidmap: write to uid_map failed: Operation not permitted
: exit status 1

My goal with this exercise is to start the docker daemon on a host in unprivileged mode, and run a single container. That's all I need, but I wasn't able to find any other references to running the docker daemon as non-root user other than above instructions.

Can someone help me how I can resolve this issue? Also, if for my use case there's a better approach, please let me know. Appreciate your time!

tkcode
  • 65
  • 1
  • 9

0 Answers0