From 7b37da42f427147272e413cf4ed81e1f544b8dcb Mon Sep 17 00:00:00 2001 From: frank-dspeed Date: Thu, 15 Feb 2024 09:06:08 +0000 Subject: [PATCH] examples/vm/rootless-docker.md aktualisiert --- examples/vm/rootless-docker.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/examples/vm/rootless-docker.md b/examples/vm/rootless-docker.md index 7d387ff..d3a6d59 100644 --- a/examples/vm/rootless-docker.md +++ b/examples/vm/rootless-docker.md @@ -12,7 +12,7 @@ As `root`: useradd -m rootless passwd rootless apt-get install -y uidmap # Not mentioned but needed for docker rootless. -``` + ``` - Install [`docker-ce`](https://docs.docker.com/engine/install/) - (Recommended) Disable the system-wide Docker daemon @@ -22,12 +22,19 @@ As `root`: As the `rootless` user: - Follow the instructions for [enabling rootless mode](https://docs.docker.com/engine/security/rootless/) -- Add the following lines to the `/home/rootless/.bashrc`: +- Add the following line to the `/home/rootless/.bashrc`: ```bash - export XDG_RUNTIME_DIR=/home/rootless/.docker/run - export PATH=/home/rootless/bin:$PATH - export DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock +for f in ./.bashrc.d/*.bash; do echo "Processing $f file..."; . "$f"; done +``` + +- Create the .bashrc.d directory `mkdir ~/.bashrc.d` +- Add the following lines to the `/home/rootless/.bashrc.d/rootless-docker.bash`: + +```bash +export XDG_RUNTIME_DIR=/home/rootless/.docker/run +export PATH=/home/rootless/bin:$PATH +export DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock ``` - Reboot. Ensure that the Docker process is working.