Monday, December 13, 2021

add a user to the Docker group

 if you got an error like this:

$ docker run hello-world
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/create: dial unix /var/run/docker.sock: connect: permission denied.

add a user to the Docker group then

$ sudo usermod -a -G docker $USER
$ mkdir “$HOME”/.docker
$ sudo chmod g+rwx “$HOME/.docker” -R
$ sudo chmod 666 /var/run/docker.sock

No comments:

Post a Comment

Add disk image to Windows OS on Proxmox

  1) Enter into the Proxmox console 2) Select the VM -> Hardware -> Add -> Hard Disk: 3) Configure the new disk image: 1. Select th...