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

TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX with docker-compose.yml

Open outsideMyBox opened this issue 4 years ago • 1 comments

Hi,

I am using a docker-compose.yml for my tests:

version: '3.4'

services:
  elastic:
    image: elasticsearch:7.9.2
[...]

and try to use a private docker registry when running the tests:

export TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX=<my registry>
./gradlew clean test

Nevertheless, it seems that my default registry is not picked up for the images defined in docker-compose.yml (but it is for the ones used internally by testcontainer such as testcontainers/ryuk. I went to this conclusion by checking docker image ls which doesn't return the images prefixed by the private registry.

Do I miss something or does TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX not work with docker-compose.yaml?

I'm using org.testcontainers:testcontainers:1.15.3

outsideMyBox avatar Jun 22 '21 07:06 outsideMyBox

Same thing.

DJ-Glock avatar Aug 01 '22 17:08 DJ-Glock