Closed vineethnnn closed 4 years ago
vi Dockerfile
FROM openjdk:8 LABEL author="khaja" LABEL version="0.4" LABEL project="QT" COPY spring-petclinic.jar /spring-petclinic.jar EXPOSE 8080 ENTRYPOINT ["java"] CMD ["-jar", "/spring-petclinic.jar"]
Then after saving the above file to vi Dockerfile, I'm getting the below error message.
ubuntu@ip-172-31-41-130:~/spc$ docker image build -t spc:0.4 . Sending build context to Docker daemon 47.65MB Step 1/8 : FROM openjdk:8 ---> b190ad78b520 Step 2/8 : LABEL author="khaja" ---> Using cache ---> d67eb1cc9684 Step 3/8 : LABEL version="0.4" ---> Using cache ---> 2a39bc7d480a Step 4/8 : LABEL project="QT" ---> Using cache ---> 6900a4f8009a Step 5/8 : COPY spring-petclinic.jar /spring-petclinic.jar COPY failed: stat /var/lib/docker/tmp/docker-builder774168234/spring-petclinic.jar: no such file or directory
Step failed due file path is not correct
please check spring-petclinic is there in your local, if available please check the name and give right path.
vi Dockerfile
FROM openjdk:8 LABEL author="khaja" LABEL version="0.4" LABEL project="QT" COPY spring-petclinic.jar /spring-petclinic.jar EXPOSE 8080 ENTRYPOINT ["java"] CMD ["-jar", "/spring-petclinic.jar"]
Then after saving the above file to vi Dockerfile, I'm getting the below error message.
ubuntu@ip-172-31-41-130:~/spc$ docker image build -t spc:0.4 . Sending build context to Docker daemon 47.65MB Step 1/8 : FROM openjdk:8 ---> b190ad78b520 Step 2/8 : LABEL author="khaja" ---> Using cache ---> d67eb1cc9684 Step 3/8 : LABEL version="0.4" ---> Using cache ---> 2a39bc7d480a Step 4/8 : LABEL project="QT" ---> Using cache ---> 6900a4f8009a Step 5/8 : COPY spring-petclinic.jar /spring-petclinic.jar COPY failed: stat /var/lib/docker/tmp/docker-builder774168234/spring-petclinic.jar: no such file or directory