I am reading the Docker documentation regarding the configuration of rootless mode. I don’t understand why at one point it says:
[INFO] Make sure the following environment variables are set (or add them to ~/.bashrc):
export PATH=/usr/bin:$PATH
export DOCKER_HOST=unix:///run/user/1000/docker.sock
However, later on, we learn that we need to directly select a context by issuing the command:
docker context use rootless
But doing this results in a warning:
docker context use rootless
rootless
Current context is now "rootless"
Warning: DOCKER_HOST environment variable overrides the active context. To use "rootless", either set the global --context flag, or unset DOCKER_HOST environment variable.
So, setting the DOCKER_HOST variable earlier now causes an error, and the recommended solution is to perform an “unset” on a variable that we were previously supposed to set.
Can someone explain this to me?