Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

networks are not automatically removed #2

Closed
ftardif opened this issue Jan 8, 2019 · 4 comments
Closed

networks are not automatically removed #2

ftardif opened this issue Jan 8, 2019 · 4 comments

Comments

@ftardif
Copy link

ftardif commented Jan 8, 2019

I am running a docker compose with testcontainers. But I do not explicitly stop the DockerComposeContainer at the end of my test (because the container is statically reused by multiple test in the test suite). I was expecting the moby-ryuk to delete the containers and the networks at the end. It actually does delete the container correctly, but it does not seem to delete the networks.

~/devel/docker-fonse$ docker ps
CONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS                  PORTS                          NAMES
8c7a7503accb        confluentinc/cp-zookeeper:5.1.0     "/etc/confluent/dock…"   1 second ago        Up Less than a second   2181/tcp, 2888/tcp, 3888/tcp   z2wsbcee3xqm_zookeeper_1
0a1b8c2ba32f        docker/compose:1.8.0                "/usr/bin/docker-com…"   3 seconds ago       Up 2 seconds                                           quizzical_jennings
686039115d69        quay.io/testcontainers/ryuk:0.2.2   "/app"                   8 seconds ago       Up 7 seconds            0.0.0.0:32827->8080/tcp        testcontainers-ryuk-fcc1e2e8-88a6-448b-98f3-510af7731e0a
~/devel/docker-fonse$ docker logs testcontainers-ryuk-fcc1e2e8-88a6-448b-98f3-510af7731e0a -f
2019/01/08 18:42:54 Starting on port 8080...
2019/01/08 18:42:54 Connected
2019/01/08 18:42:54 Adding {"label":{"org.testcontainers.sessionId=fcc1e2e8-88a6-448b-98f3-510af7731e0a":true,"org.testcontainers=true":true}}
2019/01/08 18:42:54 Adding {"label":{"com.docker.compose.project=z2wsbcee3xqm":true}}
2019/01/08 18:43:26 EOF
2019/01/08 18:43:26 Disconnected
2019/01/08 18:43:36 Timed out waiting for connection
2019/01/08 18:43:36 Deleting {"label":{"org.testcontainers.sessionId=fcc1e2e8-88a6-448b-98f3-510af7731e0a":true,"org.testcontainers=true":true}}
2019/01/08 18:43:36 Deleting {"label":{"com.docker.compose.project=z2wsbcee3xqm":true}}
2019/01/08 18:43:38 Removed 6 container(s), 0 network(s), 0 volume(s)
~/devel/docker-fonse$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
~/devel/docker-fonse$ docker network list
NETWORK ID          NAME                  DRIVER              SCOPE
12cb5757d5e4        bridge                bridge              local
c7829c02e770        host                  host                local
7b2bb170377d        none                  null                local
3b836122fd7c        z2wsbcee3xqm_patate   bridge              local
~/devel/docker-fonse$ 

Is this the expected behavior? I was under the impression that the ryuk was meant exactly for this purpose...

@bsideup
Copy link
Member

bsideup commented Apr 9, 2019

Reported as docker/compose#6636

@slnowak
Copy link

slnowak commented Aug 19, 2019

@bsideup any updates on that? I think I've just encountered this issue and the corresponding docker compose ticket is closed

@rnorth
Copy link
Member

rnorth commented Sep 9, 2019

I'm looking into this at the moment; I suspect the most straightforward path is to upgrade the version of docker-compose that we use to at least support v2.1 compose files.

Will have a try with that approach first.

rnorth added a commit to testcontainers/testcontainers-java that referenced this issue Sep 9, 2019
…ge pull

Together with using Compose file 2.1 syntax, this is a solution to network cleanup issue described in:
 * #1767
 * #739
 * testcontainers/moby-ryuk#2
 * docker/compose#6636

Solution to general credential helper authenticated pull issues in:
 * docker/compose#5854

Tangentially should add support for v3 syntax (not yet tested) re #531
rnorth added a commit to testcontainers/testcontainers-java that referenced this issue Nov 23, 2019
* Upgrade docker-compose image to latest version and perform direct image pull

Together with using Compose file 2.1 syntax, this is a solution to network cleanup issue described in:
 * #1767
 * #739
 * testcontainers/moby-ryuk#2
 * docker/compose#6636

Solution to general credential helper authenticated pull issues in:
 * docker/compose#5854

Tangentially should add support for v3 syntax (not yet tested) re #531
@rnorth
Copy link
Member

rnorth commented Dec 7, 2019

This should have been resolved in #1847, with an upgrade to the version of docker compose in use. Release notes here: https://github.com/testcontainers/testcontainers-java/releases/tag/1.12.4

@rnorth rnorth closed this as completed Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants