dex4er / nss-docker

NSS module for finding Docker containers
GNU Lesser General Public License v2.1
42 stars 14 forks source link

Root only? #6

Closed g-aaroncruz closed 6 years ago

g-aaroncruz commented 6 years ago

When following the following:

$ docker run -d --name test dex4er/alpine-init
a548fba14c314e77a1630580f6536e09002d84e5610b85a08c622fa451a4f893

$ getent hosts test.docker
172.17.0.4      test.docker

$ ping test.docker
PING test.docker (172.17.0.4) 56(84) bytes of data.
64 bytes from 172.17.0.4: icmp_seq=1 ttl=64 time=0.171 ms

I can only get this to work if I ping test.docker being root, is there a way I can make this available to all users not only root?

g-aaroncruz commented 6 years ago

Additionally, can I change the domain name from docker to docker.rodeo.us?

dex4er commented 6 years ago

It is about an access to /var/run/docker.sock file. Usually it is enough to add extra user do docker group.

You can change domain name with ./configure --with-docker-domain-suffix=.docker.rodeo.us command before make.