Docker Community Forums

Share and learn in the Docker community.

Dockerfile: COPY does not work with wildcard

According to the documentation COPY support wildcard on SOURCE.

COPY --from=java11 [ "C:\\Program Files\\AdoptOpenJDK\\jdk-11*", "C:/Program Files/Java/jdk-11" ]

On Windows the COPY does not support wildcard. It throws an error.
COPY failed: GetFileInformationByHandle \\?\Volumne[3a5004c9-4693-4e3d-93d7-42:00eb647a6]: Incorrect function.