1

I am trying to run multiple Docker daemon configured to run containers with Hyper-V isolation and LCOW on the same Windows 10 machine. I was able to configure the daemons to manage their own data files, but I am still struggling to get the network configuration clean.

When the first daemon start, it binds to the local "nat" network for DNS resolution. When the second daemon starts, it tries to bind to the same "nat" network then fails as port 53 is already being used by first daemon.

ERRO[2019-02-15T15:50:58.194988300Z] Resolver Setup/Start failed for container nat, "error in opening name server socket listen udp 172.18.64.1:53: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted." Containers started by this daemon then cannot perform any name resolution. Access through IP still works properly.

Here is the dockerd configuration I am currently using:

{
  "registry-mirrors": [],
  "insecure-registries": [],
  "bridge": "mydaemon1",
  "data-root": "C:\\Users\\myuser\\Desktop\\Docker\\Docker",
  "deprecated-key-path": "C:\\Users\\myuser\\Desktop\\Docker\\Docker\\config\\key.json",
  "debug": true,
  "exec-root": "C:\\Users\\myuser\\Desktop\\Docker\\Docker\\exec-root",
  "exec-opts": [
    "isolation=hyperv"
  ],
  "experimental": true,
  "group": "mydaemon-docker",
  "hosts": [
    "npipe:////./pipe/mydaemon1_engine"
  ],
  "pidfile": "C:\\Users\\myuser\\Desktop\\Docker\\Docker\\docker.pid",
  "storage-opts": [
    "lcow.kirdpath=C:\\Users\\myuser\\Desktop\\Docker\\server\\resources",
    "lcow.kernel=lcow-kernel",
    "lcow.initrd=lcow-initrd.img"
  ]
}

I tried to tweak the bridge configuration, but it didn't change anything. Daemon always tries to connect to nat network. It looks like the only supported value is none, which removes the default eth0 in the containers and any DNS support.

Is it possible to configure the network used for DNS resolution, ie nat here?
Ideally I want the daemon to have its own, dedicated, nat network.

I know it is not possible to do it in Docker for Windows while using the MobyVM as WinNAT, which is used in that case, does not support it.
While using Hyper-V isolation and LCOW, it seems WinNAT is not used anymore as Get-NetNat does not return any NAT network configuration despite DNS working properly. I am not sure I am right on anything, whether this is possible neither if any other Windows limitation applies...

GGirard
  • 1,145
  • 1
  • 13
  • 33
  • I am facing the same problem, I would like to configure different docker images and link them because i need to use different disks. Do you find a solution please? – Virginie Jul 26 '19 at 08:29
  • This issue is about running multiple docker daemons on the same host. What you are trying to achieve looks completely different however as it has to be done at the container level, not the daemon level. – GGirard Jul 26 '19 at 13:58
  • I think it's at the same level, I have a huge amount of data, i need to use different docker daemons on different disks but the same host – Virginie Jul 29 '19 at 07:27
  • Can you explain a bit more what you want to achieve? If it's to share data between your images, then your solution should be to use volumes. Having multiple daemons won't help to share data. – GGirard Jul 29 '19 at 12:50
  • I'm using Galaxy within a Docker container. For the moment, data are in the same container repository (> 2 Tb data). Volume shared between windows host and containers slow down all process (too much data access I think). My aim is to have a docker instance with installed tools + Galaxy container on ssd disk and data + databases on other disks within daemon instance to encounter windows reads. – Virginie Jul 29 '19 at 14:38
  • You should definitively opens your own issue for this. Data is never mounted on the daemon side, but in the container instead. So having multiple daemons won't help in your case as that's not what enables a container to access data on the host. – GGirard Jul 29 '19 at 15:27

0 Answers0