Skip to content

Is it possible to bind a container to multi networks? #17750

@tonicmuroq

Description

@tonicmuroq

I'm using docker 1.9.0 and I use docker network create to create 2 networks named 'net', 'net2', but when I started container, I tried to pass --net=net1 --net=net2 or --net=net1,net2 to join multi network before real process in container starts, I got failed.
I checked source code and I found allocateNetwork when allocate all networks in container.NetworkSettings.Networks, so it must be possible to do this, but how? It seems currently the API doesn't offer this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/networkingNetworkingkind/enhancementEnhancements are not bugs or new features but can improve usability or performance.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions