After creating an app in a docker container, you are bound to cross to a problem on wanting to access the containerized website or application outside the host. In this guide, you will know how to ping a docker container or the containerized website you are hosting outside the host.
1. Close the Virtual Machine and open Oracle VM VirtualBox Manager.
2. Select the VM used by Docker
![](https://www.nucleiotechnologies.com/wp-content/uploads/2021/09/image-237.png)
3. Click Settings -> Network
Adapter 1 should in be default “Attached to: NAT”
![](https://www.nucleiotechnologies.com/wp-content/uploads/2021/09/image-238.png)
4. Click Advanced -> Port Forwarding
![](https://www.nucleiotechnologies.com/wp-content/uploads/2021/09/image-239.png)
5. Add rule: Protocol TCP, Host Port 8080, Guest Port 8080 (leave Host IP and Guest IP empty)
Guest is your docker container and Host is your machine
![](https://www.nucleiotechnologies.com/wp-content/uploads/2021/09/image-240.png)
You can now browse to your container via localhost:8080 and your-internal-ip:8080.
![](https://www.nucleiotechnologies.com/wp-content/uploads/2021/09/image-242-1024x553.png)
![](https://www.nucleiotechnologies.com/wp-content/uploads/2021/09/image-241-1024x556.png)