zlacker

[parent] [thread] 1 comments
1. johnta+(OP)[view] [source] 2025-01-06 00:49:19
You can specify the interface address to listen on, like "127.0.0.1:8080:8080" or "192.168.1.100:8080:8080". I have a lot of containers exposed like this but bind specifically to a vpn ip on the host so that they don't get exposed externally by default.
replies(1): >>diggan+iX
2. diggan+iX[view] [source] 2025-01-06 12:45:29
>>johnta+(OP)
The trouble is that docker seems to default to using 0.0.0.0, so if you do `docker run -it -p 8080 node:latest` for example, now that container accepts incoming connections on port :32768 or whatever docker happens to assign it, which is bananas default behavior.
[go to top]