install-rootless-docker-on-ubuntu

Refdocs.docker.com/engine/security/rootless

Install docker

link

Install depends

1
sudo apt-get -y install uidmap dbus-user-session

Disable docker service

1
sudo systemctl disable --now docker.service docker.socket

User environment setup

$HOME/.bashrc
1
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock

Install rootless docker

Running this command in USER account. Do not use su - to switch account to run this command.

1
dockerd-rootless-setuptool.sh install