Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Add ssh user to docker group? #3178

Closed
ahmetb opened this issue Mar 10, 2016 · 3 comments
Closed

Add ssh user to docker group? #3178

ahmetb opened this issue Mar 10, 2016 · 3 comments

Comments

@ahmetb
Copy link
Contributor

ahmetb commented Mar 10, 2016

When I create a machine on Ubuntu, the default ssh user is not added to the docker group (usermod -a -G docker <ssh-user>) and therefore when I do docker-machine ssh vm and type docker ps it doesn't work.

Is it a deliberate decision or just something not implemented? I think fixing this would help making the user experience better.

repro:

~ docker-machine create -d google  --google-project <project> dev
~ docker-machine ssh dev

...in ssh prompt :
docker-user@dev2:~$ docker ps
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

docker-user@dev2:~$ sudo docker ps
(works)
@nathanleclaire
Copy link
Contributor

It's always been that way (cfr. amazonec2) but maybe we should add the user automatically for consistency. Historically I have actually been in favor of using sudo with docker (at least in higher environments) but I have to wonder if maybe that ship has sailed and we should just enforce some consistent behavior.

@ahmetb
Copy link
Contributor Author

ahmetb commented Mar 15, 2016

I bet people would be happier if you just add the user to the docker group. That's what curl get.docker.com | sh tells you to do (optionally) anyway, so it's not a bad thing. I also bet, having to type sudo all the time is annoying for most people. :)

@ahmetb
Copy link
Contributor Author

ahmetb commented Jun 28, 2016

Closing as it is by design.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants