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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745247334a4618469.html
评论列表(0条)