简体   繁体   中英

Docker on several hosts (Windows and Ubuntu)

I have 2 hosts with Docker: Ubuntu and Windows(docker-desktop). I want to connect a container with Adminer(Windows) to a container with MariaDB(Ubuntu). Is it possible?
My hosts locate in the same local network, and containers are isolated from each other(of course). I was trying to create overlay network and to bind between each other, but worker's message has been: "docker: Error response from daemon: attaching to network failed, make sure your network options are correct and check manager logs: context deadline exceeded."
My goal is to make communication between different host containers. Please, can you help me with my problem:)

  • Important: Make sure your host machines can communicate with each other over the network, and there are no issues due to network firewalls, etc.
  • Looks like need to bind the port of your container to your host machine.
  • When you are running your Docker containers use the -p option. You can find a lot of examples athttps://docs.docker.com/config/containers/container-networking/ .
  • After you have exposed your containers port, you can access them using <host-machine-ip>:<host-machine-port-you-used-to-bind-container>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM