Skip to content

Allow multiple networks #523

@martin-mueller-cemas

Description

@martin-mueller-cemas

Proposed change

Allow spawned containes to be in multiple networks instead of only one.

Currently, DockerSpawner.network_name only allows to specify one network the container will be part of.

Alternative options

Instead of adding the container to multiple networks, the container can be added to the Docker default bridge (default setting for DockerSpawner.network_name. This way the container can communicate with other containers on the default bridge network, but only via IP addresses instead of host/service names.

Who would use this feature?

With the ability to set multiple networks, the containers do not need to be in the Docker default bridge and can access each other via host/service names. This also provides better network isolation and thus better security.

(Optional): Suggest a solution

DockerSpawner.network_name should be a list (like DockerSpawner.mounts) of all Docker networks the spawned container will be added.

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