admin管理员组文章数量:1416050
I'm trying to configure my Quarkus application to map a volume during the test phase.
datasource:
devservices:
enabled: true
volumes:
${INIT_SQL_SCRIPTS_PATH}: /container-entrypoint-initdb.d
The ${INIT_SQL_SCRIPTS_PATH}
property is defined in two places:
- in a maven profile activated for the Windows OS
- in Jenkins, as an environment property
Unfortunately, even if I see that the property is found (I ran mvn -X
and the logs mention it), it's not injected in the volume mapping.
The error that I see is:
2025-02-03 09:17:24,799 ERROR [tc.doc.io/gvenzl/oracle-free:23-slim-faststart] (build-61) Could not start container: com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"message":"invalid volume specification: 'C:\my_app\${INIT_SQL_SCRIPTS_PATH}:/container-entrypoint-initdb.d:rw,z'"}
Any suggestion ?
I'm trying to configure my Quarkus application to map a volume during the test phase.
datasource:
devservices:
enabled: true
volumes:
${INIT_SQL_SCRIPTS_PATH}: /container-entrypoint-initdb.d
The ${INIT_SQL_SCRIPTS_PATH}
property is defined in two places:
- in a maven profile activated for the Windows OS
- in Jenkins, as an environment property
Unfortunately, even if I see that the property is found (I ran mvn -X
and the logs mention it), it's not injected in the volume mapping.
The error that I see is:
2025-02-03 09:17:24,799 ERROR [tc.doc.io/gvenzl/oracle-free:23-slim-faststart] (build-61) Could not start container: com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"message":"invalid volume specification: 'C:\my_app\${INIT_SQL_SCRIPTS_PATH}:/container-entrypoint-initdb.d:rw,z'"}
Any suggestion ?
Share Improve this question asked Feb 3 at 9:18 IonutIonut 11 Answer
Reset to default 0Quarkus doesn't replace the keys, only the values. My workaround was to use the resources plugin to replace the INIT_SQL_SCRIPTS_PATH placeholder with the proper path, depending on the environment.
本文标签: testcontainersQuarkus dynamic keysIs it possibleStack Overflow
版权声明:本文标题:testcontainers - Quarkus dynamic keys ? Is it possible? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745247334a2649614.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论