Open gaeljw opened 1 year ago
Using new ImageFromDockerfile()
(without giving a name to the image) works fine as a workaround.
ImageFromDockerfile
doesn't consider the TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX
value but GenericContainer
does it. So, when building the image on-the-fly the image is created without TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX
value but when trying to run the image, the image contains TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX
value.
Module
Core
Testcontainers version
1.15.2
Using the latest Testcontainers version?
No
Host OS
Linux
Host Arch
x86
Docker version
What happened?
Usage of
TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX
for image substitution affects the name given to local images as well.For example, the following piece of code:
Triggers the following error:
The local name
redis-sentinel
is replaced bymy.company.registry.net/redis-sentinel:latest
which doesn't make sense at all.Relevant log output
No response
Additional Information
No response