Skip to content

Testcontainers downloads too much images #3310

@iNikem

Description

@iNikem

I have the following code in my Spock test:

  def setupSpec() {
    collector = new GenericContainer<>("otel/opentelemetry-collector-dev")
      .dependsOn(backend)
      .withNetwork(network)
      .withNetworkAliases("collector")
      .withLogConsumer(new Slf4jLogConsumer(logger))
      .withCopyFileToContainer(MountableFile.forClasspathResource("/otel.yaml"), "/etc/otel.yaml")
      .withCommand("--config /etc/otel.yaml")
    collector.start()
  }

It used to work fine. Recently I upgraded testcontainers to version 1.15.0-rc2 and my GitHub action started to fail. It turns out that test has download ALL versions of otel/opentelemetry-collector-dev that are available. All 200+ of them.

I am able to reproduce this issue locally as well. I removed all local otel/opentelemetry-collector-dev images, ran the test and I already have 60 versions of them :) And test is still running.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions