Skip to content

Bug: port mapping not working with with_network (with_exposed_ports) #645

@fabricebaranski

Description

@fabricebaranski

Hi all,
I would like to have two containers connected each others, with a code similar to

test_network = Network()
test_network.create()
container1 = DockerContainer("myimage1", hostname="myimage1") \
        .with_network(test_network).with_network_aliases("myalias1").with_exposed_ports(9098)
container2 = DockerContainer("myimage1", hostname="myimage2") \
        .with_network(test_network).with_network_aliases("myalias2").with_exposed_ports(9099)
container1.start()
container2.start()

I regularly have no port mapping for my containers. Do you have any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions