3

Dockerfile is failing on the following line:

ADD ./test-web-app/build/libs/test-web*.war /app/test-web.war

Error Step 8/29 : COPY ./test-web-app/build/libs/test-web*.war /app/micro-service.war No source files were specified

This is the first time I am working on Docker builds. How do I debug this issue? Is there a way to echo if the host file is existing by a command ?

1
  • It would be helpful to have a full(er) listing of the Dockerfile and directory structure you're working with. Commented Jan 29, 2019 at 16:50

1 Answer 1

5

be sure that the path of the file is accessible where the Dockerfile is. When you run the build, the . folder is where the Dockerfile is. So you directory structure has to be something similar to this:

.
..
Dockerfile
test-web-app (folder)

To be sure that the war file is accessible try to list the file (on your host machine) for example.

$ ls ./test-web-app/build/libs/test-web*.war
Sign up to request clarification or add additional context in comments.

2 Comments

my dockerfile is actually two level deep. ~/test-web$ docker build -t xyz . -f infra/docker/Dockerfile the war is ~/test-web/test-web-app/build/libs folder
i had a typo issue. i was doing the wrong ls and i had the wrong path in the docker file. thanks for the response

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.