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.
@iNikem could you please share which version you used before 1.15.0-rc2? Perhaps you can find out which version introduced this (obviously faulty) behaviour?
1.14.3
Ouch, sorry for this. I think I know what this is likely to be caused by, and will look into it ASAP.
As a workaround, if you want the latest image, please could you explicitly include :latest in the image name?
As a workaround, if you want the latest image, please could you explicitly include
:latestin the image name?
Yes, it works nicely when adding :latest