Posts

Docker - Post install Tasks

Docker - Post-install steps Manage Docker as a non-root user Docker daemon binds to a Linux socket instead of a TCP port. By default that Unix socket is owned by the user "root" and other users can only access it using sudo. The docker daemon always runs as the root user. To avoid using sudo , create a Unix group called docker and add users to it. When the Docker daemon starts, it creates a Unix socket accessible by members of the docker group. The docker group grants privileges equivalent to the root user. To create the docker group and add your user: 1. Create the docker group sudo groupadd docker 2. Add your user to the docker group sudo usermod -aG docker $USER 3.Logout and log back 4.Verify that you can run docker commands without sudo: docker run hello-world If you initially ran Docker CLI commands using sudo before adding your user to the docker group, you may see the following error, which indicates that your ~/.docker/ directory was creat...