Copy Jar file to docker container using Docker command

Viewed 500

How can I copy the jar file without specifying the version in the copy command?

Below is the original command

COPY web-app/target/web-app-0.0.1-SNAPSHOT-exec.jar /web-service.jar

Thank you

1 Answers

I use that docker file in my spring projects: with a docker compose up command it runs.

FROM openjdk:8
ADD dockerspringboot.jar dockerspringboot.jar
EXPOSE 8094
ENTRYPOINT ["java", "-jar", "dockerspringboot.jar"]
Related