Skip to content

Support network_mode=host for local testing #5318

@andrea-santoro1-a2a

Description

@andrea-santoro1-a2a

Describe the feature you'd like
Sagemaker local uses docker compose internal network to make containers communicate with each other.
For some tools, such as Snowflake, some companies may require login via SSO when testing locally.
However the login redirect (bringing back the access token) cannot be managed by the sagemaker container since it is not listening to the same localhost (docker internal network) as the user's browser (actual localhost).

How would this feature be used? Please describe.
Allow setting network_mode="host" in container configuration, so that browser redirects can be handled succesfully. This also helps with other random VPN issues not manging correctly docker traffic.

When set, the network_mode parameter should be propagated to each container and ports must be discarded (as network_mode="host" overrides ports, allowing traffic on any port).

Describe alternatives you've considered
None worked, no documentation about containers networking can be found in the official docs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions