Can't connect to my docker container apache from internet

eroxunn

New Member
Feb 5, 2023
1
0
1
Hello,
i have a problem i got :

proxmox and on them installed Debian 11 and on Debian i got Docker installed.

main problem is, i set a vmbr on proxmox with IP X.X.X.X and my debian machine have 192.168.x.x ip adress on ens

installed docker got own network like 172.17.0.1

i started apache container on port 80

the problem is i cant reach this docker container from network

is there any additional configuration to do?

any help?:)
thx
 
Hey,

did you map the port([1] or [2]) in your docker container correctly? From what network do you want it to be reachable? The docker network 172.17.0.1 you mentioned is usually docker internal, and mostly used for communication between containers. If docker port exposure is setup correctly, the apache service is reachable on the IP of your VM/CT(the debian machine on 192.168.x.x you mention). So, if you now want it to be reachable from the internet you have to setup port forwarding, something like [3], on your static IP that PVE is on(to the VM/CT apache is running on).

[1] https://docs.docker.com/engine/reference/run/#expose-incoming-ports
[2] https://docs.docker.com/engine/reference/builder/#expose
[3] https://www.adamintech.com/how-to-use-iptables-for-port-forwarding/
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!