How to Access Docker Container in Host machine using Bridged Network

Once you have made your docker container in your virtual machine box, accessing it in your host machine is something you are bound to do. One way to ping your docker container in your host machine is using NAT network by adding rule in port forwarding. But there is also a way to access it using bridged networking.

To access it using Bridged Networking, follow the steps below:

1. Turn off your Virtual machine and open its setting then navigate to Network.

2. Change NAT to Bridged adaptor.

3. Click OK then open your VM box. Open the Settings>Network then click the encircled button.

4. You see the current IP address of your Virtual Machine labeled as IP4 Address.

5. Use this IP Address together with the port you assigned in your docker container. Open your browser in your host machine to navigate it.

It is now accessible once it has shown your dockerized application.

Leave a Comment

Your email address will not be published. Required fields are marked *