-
Notifications
You must be signed in to change notification settings - Fork 0
/
nss-docker.8
45 lines (34 loc) · 1.23 KB
/
nss-docker.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
.TH NSS-DOCKER 8 2022-02-11 "nss-docker 0.1"
.SH NAME
nss-docker, libnss_docker\&.so\&.2 - Hostname resolution for Docker containers
.SH DESCRIPTION
.PP
\fBnss-docker\fP is a plug-in module for the GNU Name Service Switch (NSS) functionality of the glibc providing hostname resolution for the names and UUID of Docker containers.
.PP
To use this module, add "docker" to the line starting with "hosts:" in the file /etc/nssswitch.conf.
In order to be able to use this module, you \fBneed to have the docker daemon running AND be allowed to list docker containers\fP (e.g. being root, being part of the "docker" group, using an authz plugin that allows you to do so, etc.).
.SH EXAMPLE
.PP
Here is an example of /etc/nssswitch.conf with "docker" enabled:
.PP
.RS 4
.EX
passwd: files systemd
group: files [SUCCESS=merge] systemd
shadow: files systemd
gshadow: files systemd
publickey: files
hosts: mymachines mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname \fBdocker\fP dns
networks: files
protocols: files
services: files
ethers: files
rpc: files
netgroup: files
.EE
It is recommended to place "docker" at the end \fBbut before\fP "dns".
.SH SEE ALSO
.PP
\fBnsswitch.conf\fP(5), \fBgetent\fP(1)
.SH AUTHOR
Kenji 'Nhqml' Gaillac