Skip to content

DockerComposeContainer does not remove the network after using a version 2 compose file #152

Closed

Description

@haines

I'm not using the ambassador containers so am not affected by #146, meaning that I am successfully running with a version 2 docker-compose file. This means that each test run creates a network which is not removed at the end of the test.

Once I hit 32 networks, I ran into an error when trying to run docker-compose:

ERROR: failed to parse pool request for address space "LocalDefault" pool "" subpool "": could not find an available predefined network

We need to either remove the network ourselves, or run docker-compose down to clean up.

Activity

  1. rnorth commented on Jun 2, 2016

    @rnorth
    Member

    Good catch, thanks! As discussed, I'll work this into the docker compose
    refactoring I'm doing. I think I'd like to:

    • make use of docker-compose down in normal shutdown scenarios
    • leave the container reaper prepped to kill any containers on exceptional
      JVM shutdown
    • (possibly) set up docker-compose down in a JVM shutdown hook too, to
      avoid networks slipping through the cracks
  2. haines commented on Jun 5, 2016

    @haines
    ContributorAuthor

    FWIW I backported the remove network command from docker-java 3.0.0-RC5 into our test suite (I see they released 3.0.0 final on Friday night!) and (with a sprinkling of nasty reflection to access private fields in the docker client), we have it successfully dropping the default network after the test run. This is sufficient for our use case; we have no plans to use additional custom networks.

  3. rnorth commented on Jun 11, 2016

    @rnorth
    Member

    Resolved in #156

  4. modified the milestone: 1.1.0 on Jul 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions