Container with host network
How can I get workspace containers deployed by coder onto the coder host's network? Normally, they seem to only have docker internal networking and can't be reached from the outside.
4 Replies
<#1369779743771070545>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
hey @journeywolf, this is possible but i'd like to know your use-case for this
it feels like the wrong solution to the problem you might be facing, we usually don't want every container deployed by coder to be on the host's network to avoid security issues and avoid port collision between workspaces
Thanks. I agree and in many cases also would want a container not to be on the host network. But my particular use case is that my code runs a web server and I want to be able to connect to that from my local machine (without VPNs etc) to test it to see how it behaves in a "normal" setting. So, ideally, I would be able to create a new template for this use case and keep using the normal template for isolated containers.