U
U
user.2019-04-25 21:31:03
Docker
user., 2019-04-25 21:31:03

How to contact the server running in the docker, which in turn is located on the virtual machine?

Good evening,
There is a virtual machine with one active network interface operating in bridge mode , in which the container is running, in turn, in which my server is running. In a virtual machine, I see a newly created docker0 interface with an IP address assigned to it, when accessing this ip, I can’t get access to my server, when accessing the VM network interface, the situation is similar, there is no access ... Actually, the question is: how to access a server running in a container which is on the VM?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Zamyatin, 2019-04-26
@nekolov

Forward a port from the container to the virtual machine using the -p switch. Next, access the virtual machine by its external IP address and port selected above. If it does not connect, then check the firewall on the VM.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question