Skip to content

[Request]: Allow for port publishing / connectivity to container when "none" network is selected #1037

@matthewcmead

Description

@matthewcmead

Feature or enhancement request details

Sometimes the purpose of using --network none is to isolate the container from being able to connect to external networks while connectivity from the host to the container would be useful. Currently when using --network none, if ports are published with -p, there is no listening socket on the host and no connectivity to the container.

I'm requesting to change this to allow for host to container connectivity to work using port publishing when --network none is used.

There is a workaround for this, but it's somewhat of a hassle: --publish-socket can be used to connect a unix domain socket into the container and socat can be used on the host as well as the container to connect the published domain socket to ports on the host and in the container. Perhaps this can serve as the mechanism to accomplish the connectivity in an automated way that entirely avoids activating the network stack with host connectivity for the container?

Thanks for the consideration.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions