testcontainers-node
testcontainers-node copied to clipboard
TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX should first try to pull images using docker rather than https
Expected Behaviour
Whenever testcontainers try to pull images it should pull using docker pull <image> rather than using http(s).
Because incase of private repositories like AWS ECR access is configured via IAM roles and for http request it requires explicit setting of creds
Actual Behaviour Testcontainers use https to pull the images
Testcontainer Logs console.log
Error: 2025-04-17T10:25:57.625Z testcontainers [ERROR] Failed to pull image "<AWS_ACCOUNT_ID>.dkr.ecr.eu-west-1.amazonaws.com/testcontainers/docker.io/testcontainers/ryuk:0.11.0": Error: (HTTP code 500) server error - Head "https://<AWS_ACCOUNT_ID>.dkr.ecr.eu-west-1.amazonaws.com/v2/testcontainers/docker.io/testcontainers/ryuk/manifests/0.11.0": no basic auth credentials
Steps to Reproduce
- Run it in a server where AWS private repository is set via
TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX - Try to run the testcontainers test
Environment Information
- Operating System: ubuntu
- Docker Compose Version: 2.32.4
- Node version: 22
- Testcontainers version: 10.24.2