Docker Community Forums

Share and learn in the Docker community.

Set docker toolbox container to receive information sended to host

I have a prototype that sends information to the host machine, and with Docker for Windows, the container grabs that information and everything works fine.

My docker-compose.yml file:

version: ‘3’

container_name: middleware
image: hyperloopupv:middleware
build: ‘./receta’
- “5672:5672”
- “15672:15672”
- “1338:1338/udp”
- “5556:5556/udp”

But others from my team are using Docker Toolbox, and Docker Toolbox can not use localhost. I have tried to send the information from the prototype to the IP of the container(, but the packets are lost.

Is there a way, that my team(using Docker Toolbox) and I(using Docker for Windows) can get this running without problems with the same compose file?


If I understand this correctly you access the docker host from outside. This looks more like a networking problem. The address is not part of your address range, isn’t it? So your router doesn’t know where to send these packages to. If only a single member of your team is unsing Toolbox you can probably configure the router that it sends the information to his machine, but if there is more than one it’s getting complicated.

Yes @tekki I need to send the packages to the container from outside the host.

But, I need to solve this problem without a router o managing the network. Just as it works for Docker for Windows. Maybe I need to change something for running the same on Docker Toolbox?

I know most people get angry when I give answers like “upgrade your team to Win 10 Pro”, so this line of text doesn’t exist.

You have to know that Docker Desktop and Toolbox are completely different products. Docker Desktop runs on Hyper-V, Docker Toolbox on Virtualbox. Desktop is the actual product, Toolbox is the “legacy desktop solution”.
It is possible to manipulate its IP address. If you look a the docs under ‘Options’ you find an option called virtualbox-hostonly-cidr that you can use to manipulate the IP address when you create a new machine. But before you try this notice that it is called ‘hostonly’. This means it uses the Virtualbox Host-Only adapter and “the virtual machines cannot talk to the world outside the host since they are not connected to a physical networking interface” (from the Virtualbox docs).
So unfortunately it seems there is no simple solution to your problem.

1 Like

Thanks a lot @tekki !!