The first property threw this exception: java.nio.file.InvalidPathException: Illegal char <"> at index 0: "classpath
The second property threw this exception: Could not start container: com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: mount denied: the source path "/C:/quarkus-app/target/classes/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql:ro,z" too many colons
Expected behavior
Quarkus Dev Services should provide Docker with a valid volume path -- it should not contain a colon. Probably should be /mnt/c/ or /c/ (not sure whether it wants the path inside WSL or inside Windows) instead of /C:/
Quarkus Dev Services docs should either mention that the colon in classpath: must be escaped, or work correctly even with an unescaped colon.
Quarkus Dev Services docs should either not prefix the filename with ./ (since this doesn't work on Windows), or work correctly even with the dot-slash prefix on Windows.
Actual behavior
Quarkus Dev Services gives Docker a volume path starting with /C:/. This causes Docker to fail because it considers the colon as the separator in the mapping.
Quarkus Dev Services docs don't mention anything about needing to escape the colon in classpath:
Quarkus Dev Services docs don't mention anything about ./ not working when specifying the classpath file path on Windows
How to Reproduce?
Steps to reproduce the behavior:
Download the archive containing the reproducer: reproducer.zip
Run quarkus dev
Output of uname -a or ver
Microsoft Windows [Version 10.0.22631.3155]
Output of java -version
openjdk version "17.0.6" 2023-01-17 OpenJDK Runtime Environment Temurin-17.0.6+10 (build 17.0.6+10) OpenJDK 64-Bit Server VM Temurin-17.0.6+10 (build 17.0.6+10, mixed mode, sharing)
Quarkus version or git rev
3.8.1
Build tool (ie. output of mvnw --version or gradlew --version)
Describe the bug
I was trying to map a volume into Dev Services for Database, but Quarkus Dev Services threw an exception and caused the app to stop.
I tried with these two properties - first with the colon unescaped, then escaped:
quarkus.datasource.devservices.volumes."classpath:init-db.sql"=/docker-entrypoint-initdb.d/init-db.sql
quarkus.datasource.devservices.volumes."classpath\:init-db.sql"=/docker-entrypoint-initdb.d/init-db.sql
The first property threw this exception:
java.nio.file.InvalidPathException: Illegal char <"> at index 0: "classpath
The second property threw this exception:Could not start container: com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: mount denied: the source path "/C:/quarkus-app/target/classes/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql:ro,z" too many colons
Expected behavior
/mnt/c/
or/c/
(not sure whether it wants the path inside WSL or inside Windows) instead of/C:/
classpath:
must be escaped, or work correctly even with an unescaped colon../
(since this doesn't work on Windows), or work correctly even with the dot-slash prefix on Windows.Actual behavior
/C:/
. This causes Docker to fail because it considers the colon as the separator in the mapping.classpath:
./
not working when specifying the classpath file path on WindowsHow to Reproduce?
Steps to reproduce the behavior:
quarkus dev
Output of
uname -a
orver
Microsoft Windows [Version 10.0.22631.3155]
Output of
java -version
openjdk version "17.0.6" 2023-01-17 OpenJDK Runtime Environment Temurin-17.0.6+10 (build 17.0.6+10) OpenJDK 64-Bit Server VM Temurin-17.0.6+10 (build 17.0.6+10, mixed mode, sharing)
Quarkus version or git rev
3.8.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Additional information
No response