A lot of information which is provided by the Docker host to the Docker container is done by using mounts, either:

  • explicitly, e.g. when running Docker, you pass an argument like --v /external/hostsytem/someJAR.jar:/tmp/cli.jar
  • implecitly, e.g. Docker provides the network configuration through this (e.g. the /etc/hosts file) as far as I understand it.

So there are a lot of mounts, to find out, you can use the findmnt command inside the image:

root@fedicam-prod-002:/home/saladin# docker exec -ti dockercontainer bash 
bash-4.2$ findmnt
TARGET                                 SOURCE                                                                                                   FSTYPE OPTIONS
/                                      /dev/mapper/docker-253:4-48735-2e8b8139a44a0d4362472ffaaf75cc57454cf251adcb3cc1c2fa8dbd470bdc65[/rootfs] xfs    rw,relatime,seclabel,nouuid,attr2,inode64,sunit=1024,swidth=
|-/proc                                proc                                                                                                     proc   rw,nosuid,nodev,noexec,relatime
| |-/proc/bus                          proc[/bus]                                                                                               proc   ro,nosuid,nodev,noexec,relatime
| |-/proc/fs                           proc[/fs]                                                                                                proc   ro,nosuid,nodev,noexec,relatime
| |-/proc/irq                          proc[/irq]                                                                                               proc   ro,nosuid,nodev,noexec,relatime
| |-/proc/sys                          proc[/sys]                                                                                               proc   ro,nosuid,nodev,noexec,relatime
| |-/proc/sysrq-trigger                proc[/sysrq-trigger]                                                                                     proc   ro,nosuid,nodev,noexec,relatime
| |-/proc/kcore                        tmpfs[/null]                                                                                             tmpfs  rw,nosuid,seclabel,mode=755
| |-/proc/timer_list                   tmpfs[/null]                                                                                             tmpfs  rw,nosuid,seclabel,mode=755
| |-/proc/timer_stats                  tmpfs[/null]                                                                                             tmpfs  rw,nosuid,seclabel,mode=755
| `-/proc/sched_debug                  tmpfs[/null]                                                                                             tmpfs  rw,nosuid,seclabel,mode=755
|-/dev                                 tmpfs                                                                                                    tmpfs  rw,nosuid,seclabel,mode=755
| |-/dev/pts                           devpts                                                                                                   devpts rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=6
| |-/dev/mqueue                        mqueue                                                                                                   mqueue rw,nosuid,nodev,noexec,relatime,seclabel
| `-/dev/shm                           shm                                                                                                      tmpfs  rw,nosuid,nodev,noexec,relatime,seclabel,size=65536k
|-/sys                                 sysfs                                                                                                    sysfs  ro,nosuid,nodev,noexec,relatime,seclabel
| `-/sys/fs/cgroup                     tmpfs                                                                                                    tmpfs  ro,nosuid,nodev,noexec,relatime,seclabel,mode=755
|   |-/sys/fs/cgroup/systemd           cgroup[/system.slice/docker-ec4037bd4e96e558eb7555d81231b477682f0deee357d6542948c3681d22620a.scope]      cgroup ro,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib
|   |-/sys/fs/cgroup/hugetlb           cgroup[/system.slice/docker-ec4037bd4e96e558eb7555d81231b477682f0deee357d6542948c3681d22620a.scope]      cgroup ro,nosuid,nodev,noexec,relatime,hugetlb
|   |-/sys/fs/cgroup/cpuset            cgroup[/system.slice/docker-ec4037bd4e96e558eb7555d81231b477682f0deee357d6542948c3681d22620a.scope]      cgroup ro,nosuid,nodev,noexec,relatime,cpuset
|   |-/sys/fs/cgroup/net_prio,net_cls  cgroup[/system.slice/docker-ec4037bd4e96e558eb7555d81231b477682f0deee357d6542948c3681d22620a.scope]      cgroup ro,nosuid,nodev,noexec,relatime,net_prio,net_cls
|   |-/sys/fs/cgroup/cpuacct,cpu       cgroup[/system.slice/docker-ec4037bd4e96e558eb7555d81231b477682f0deee357d6542948c3681d22620a.scope]      cgroup ro,nosuid,nodev,noexec,relatime,cpuacct,cpu
|   |-/sys/fs/cgroup/perf_event        cgroup[/system.slice/docker-ec4037bd4e96e558eb7555d81231b477682f0deee357d6542948c3681d22620a.scope]      cgroup ro,nosuid,nodev,noexec,relatime,perf_event
|   |-/sys/fs/cgroup/devices           cgroup[/system.slice/docker-ec4037bd4e96e558eb7555d81231b477682f0deee357d6542948c3681d22620a.scope]      cgroup ro,nosuid,nodev,noexec,relatime,devices
|   |-/sys/fs/cgroup/freezer           cgroup[/system.slice/docker-ec4037bd4e96e558eb7555d81231b477682f0deee357d6542948c3681d22620a.scope]      cgroup ro,nosuid,nodev,noexec,relatime,freezer
|   |-/sys/fs/cgroup/memory            cgroup[/system.slice/docker-ec4037bd4e96e558eb7555d81231b477682f0deee357d6542948c3681d22620a.scope]      cgroup ro,nosuid,nodev,noexec,relatime,memory
|   |-/sys/fs/cgroup/pids              cgroup[/system.slice/docker-ec4037bd4e96e558eb7555d81231b477682f0deee357d6542948c3681d22620a.scope]      cgroup ro,nosuid,nodev,noexec,relatime,pids
|   `-/sys/fs/cgroup/blkio             cgroup[/system.slice/docker-ec4037bd4e96e558eb7555d81231b477682f0deee357d6542948c3681d22620a.scope]      cgroup ro,nosuid,nodev,noexec,relatime,blkio
|-/backups                             adncl1-vs6:/fedicam_collab_backup                                                                        nfs    rw,relatime,vers=3,rsize=32768,wsize=32768,namlen=255,hard,p
|-/usr/share/zoneinfo/UTC              /dev/mapper/vg0-root[/usr/share/zoneinfo/Europe/Zurich]                                                  xfs    ro,relatime,seclabel,attr2,inode64,noquota
|-/run/secrets                         /dev/mapper/vg0-var[/lib/docker/containers/ec4037bd4e96e558eb7555d81231b477682f0deee357d6542948c3681d22620a/secrets]
                                                                                                                                                xfs    rw,relatime,seclabel,attr2,inode64,noquota
|-/etc/resolv.conf                     /dev/mapper/vg0-var[/lib/docker/containers/ec4037bd4e96e558eb7555d81231b477682f0deee357d6542948c3681d22620a/resolv.conf]
                                                                                                                                                xfs    rw,relatime,seclabel,attr2,inode64,noquota
|-/etc/hostname                        /dev/mapper/vg0-var[/lib/docker/containers/ec4037bd4e96e558eb7555d81231b477682f0deee357d6542948c3681d22620a/hostname]
                                                                                                                                                xfs    rw,relatime,seclabel,attr2,inode64,noquota
|-/etc/hosts                           /dev/mapper/vg0-var[/lib/docker/containers/ec4037bd4e96e558eb7555d81231b477682f0deee357d6542948c3681d22620a/hosts]