You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently working on putting in place a database in my project, and I am planning to leverage on DevServices great feature for having my local DB fired up upon a quarkus:dev/quarkusDev on my local Desktop.
It works fine for now, but I have a constraint: We have a private registry from which we need to pull the Docker images.
So I have 2 use cases to manage:
The mariadb image
the testcontainers/ryuk image
For 1., going through the documentation I can simply override the image in my application.yml file:
Pros: Nice & easy!
Cons: In case the MariaDB image version is updated internally by Quarkus, then I won't benefit from this 😢
For 2., going through the TestContainers documentation, the recommended way is to leverage on the image name suibstitution to automatically prefix any image with the provided private registry
I tried to use first the environment variable TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX setup, but I was not able somehow to make it available to the Gradle quarkusDev task, I feel like this is not possible today. This is working though with the Maven plugin with the standard confifuration/environmentVariables element.
So I looked at the other way by creating a testcontainers.properties file. The file is usually put in the src/test/resources, but to make it work for DevServices I had to put it in the src/main/resources instead
Pros: I really like the idea of applying a prefix instead of overriding the whole image definition!
Cons: I end up having a configuration file used for development in my production jar
Implementation ideas
On Quarkus side, what about putting in place the concept of image name substitution, as having a private registry is quite a common case?
Adding the capability in the Gradle plugin to inject environment/system variables to the quarkusDev task
Ideally, having a way to store configuration files dedicated to DevServices outside of src/main/resources?
The text was updated successfully, but these errors were encountered:
Description
Hello,
I am currently working on putting in place a database in my project, and I am planning to leverage on DevServices great feature for having my local DB fired up upon a
quarkus:dev
/quarkusDev
on my local Desktop.It works fine for now, but I have a constraint: We have a private registry from which we need to pull the Docker images.
So I have 2 use cases to manage:
mariadb
imagetestcontainers/ryuk
imageFor 1., going through the documentation I can simply override the image in my
application.yml
file:Pros: Nice & easy!
Cons: In case the MariaDB image version is updated internally by Quarkus, then I won't benefit from this 😢
For 2., going through the TestContainers documentation, the recommended way is to leverage on the image name suibstitution to automatically prefix any image with the provided private registry
I tried to use first the environment variable
TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX
setup, but I was not able somehow to make it available to the GradlequarkusDev
task, I feel like this is not possible today. This is working though with the Maven plugin with the standardconfifuration/environmentVariables
element.So I looked at the other way by creating a
testcontainers.properties
file. The file is usually put in thesrc/test/resources
, but to make it work for DevServices I had to put it in thesrc/main/resources
insteadPros: I really like the idea of applying a prefix instead of overriding the whole image definition!
Cons: I end up having a configuration file used for development in my production jar
Implementation ideas
quarkusDev
tasksrc/main/resources
?The text was updated successfully, but these errors were encountered: