Closed sahandha closed 8 years ago
The problem seems to be that I took out the command newgrp
. See man pages for newgrp
. This is needed so that the group changes to the newly created group. The problem though is that if I put this in, then the operations stop, and it gives me a prompt.
Maybe I can source ~/.profile.
or use newgrp -l docker
to simulate a full login.
newgrp -l docker
did not work.
Need to use sudo sg docker -c "docker pull sahandha/ubuntu:14.04"
. This essentially does what newgrp
does, but with the option -c
. The command in the quotes will be run this case.
When setting up a new VM with docker, I install docker. I then create a group docker and add the $USER to it because I encountered the problem before and this was the solution. However, when setting up the VM I get the warning
Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon. Is the docker daemon running on this host?). Using system default: https://index.docker.io/v1/
, and the following docker commands don't run. If I ssh into that VM, I can easily run these commands.