1

I am trying to achieve Continuous Integration/Delivery with Docker Cloud.

On Docker Cloud i connected my bit bucket repository, so on every commit docker build will initiate on Docker Cloud, but automated build are failing, these are the logs

ERROR: Build failed: ADD failed: stat /var/lib/docker/tmp/docker-builder406751627/target/springtest.jar: no such file or directory ERROR: Build failed with exit code 2 ERROR: Build in 'master' (094341b2) failed in 0:02:10

This is my Docker File

FROM java:8
VOLUME /tmp
ADD /target/springtest.jar springtest.jar
ENTRYPOINT ["java","-jar","springtest.jar"] 

However if i try to build the same thing on my Local Docker Terminal i am not getting Issues, i am using this command mvn package docker:build and its creating Images Successfully

So why with the same Dockerfile automated build ? Any other step i need to do?

Kuldeep
  • 31
  • 2

1 Answers1

0

Do you have springtest.jar in your local?

From error seems to be Docker Cloud is not able to find springtest.jar file.

Rohan J Mohite
  • 2,283
  • 10
  • 19
  • I am not trying in local environment. I have created a repository in Docker Cloud and i have set up Automatic build. Once i commit anything on Bit Bucket automatically build will be initiated on Docker Cloud (So the same build is failing) – Kuldeep Dec 12 '17 at 11:05
  • ok, but in that automatic build do you have springtest.jar? in same location? – Rohan J Mohite Dec 12 '17 at 19:47
  • How is jar supposed to be built on Docker cloud build? Is there a build descriptor file? – Alessandro Dionisi May 16 '18 at 12:11