Reputation: 2697
From my MAC (running Docker Machine), I have provisioned a host on AWS via docker-machine command. I then connect my terminal to the EC2 based host and I run some docker commands to launch some containers. When I do a docker ps command on my MAC, I see the containers which supposingly should be running on the EC2 host.
To verify that, I wanted to login to the host via docker-machine ssh . This succeeds, but when running the 'docker ps' account on that EC2 host(to see the container), I get back
Cannot connect to the Docker daemon. Is the docker daemon running on this host
How can I get to see a list of containers on the EC2 host? How can I know how many containers are running on the EC2 host?
Upvotes: 0
Views: 450
Reputation: 28503
The SSH user doesn't get added to the docker
group automatically. See https://github.com/docker/machine/issues/3178. Thus, you need to add it manually yourself (using usermod -a -G docker docker-user
) or use sudo docker ps
.
Upvotes: 2