testcontainers-java icon indicating copy to clipboard operation
testcontainers-java copied to clipboard

[Bug]: TESTCONTAINERS_COMPOSE_CONTAINER_IMAGE is ignored

Open frankjkelly opened this issue 5 months ago • 1 comments

Module

Core

Testcontainers version

1.21.0

Using the latest Testcontainers version?

Yes

Host OS

MacOS

Host Arch

Apple Silicon ARM

Docker version

docker version
Client: Docker Engine - Community
 Version:           28.1.1
 API version:       1.47 (downgraded from 1.49)
 Go version:        go1.24.2
 Git commit:        4eba377327
 Built:             Fri Apr 18 09:44:47 2025
 OS/Arch:           darwin/arm64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          27.5.1
  API version:      1.47 (minimum version 1.24)
  Go version:       go1.22.11
  Git commit:       4c9b3b0
  Built:            Wed Jan 22 13:40:18 2025
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          v2.0.3
  GitCommit:        06b99ca80cdbfbc6cc8bd567021738c9af2b36ce
 runc:
  Version:          1.2.5
  GitCommit:        59923ef18c98053ddb1acf23ecba10344056c28e
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

What happened?

Trying to use docker images from an internal proxy e.g.

export TESTCONTAINERS_COMPOSE_CONTAINER_IMAGE=xxx.yy.zz.com/dockerhub/library/docker:24.0.3

(Notice I set the image value to end in 3)

but when I run the integration tests via Gradle it doesn't get picked up

2025-06-16T14:44:23.857-0400 [DEBUG] [TestEventLogger]     14:44:23.857 [Test worker] WARN  tc.docker:24.0.2 - Retrying pull for image: docker:24.0.2 (119s remaining)
2025-06-16T14:44:24.332-0400 [DEBUG] [TestEventLogger]     14:44:24.332 [Test worker] WARN  tc.docker:24.0.2 - Retrying pull for image: docker:24.0.2 (118s remaining)
2025-06-16T14:44:24.854-0400 [DEBUG] [TestEventLogger]     14:44:24.854 [Test worker] WARN  tc.docker:24.0.2 - Retrying pull for image: docker:24.0.2 (118s remaining)
2025-06-16T14:44:25.627-0400 [DEBUG] [TestEventLogger]     14:44:25.627 [Test worker] WARN  tc.docker:24.0.2 - Retrying pull for image: docker:24.0.2 (117s remaining)

I also tried creating a testcontainers.properties in the classpath (and recompile) and a .testcontainers.properties in my $HOME but I still see the same behavior

NOTE: Using ComposeContainer and not DockerComposeContainer as the latter is deprecated.

Relevant log output


Additional Information

No response

frankjkelly avatar Jun 16 '25 18:06 frankjkelly

Looks to be similar (different symptom but same underlying issue?) as https://github.com/testcontainers/testcontainers-java/issues/9222

frankjkelly avatar Jun 17 '25 10:06 frankjkelly