vjuranek / docker-build-step-plugin

Other
8 stars 97 forks source link

Build context folder is not working! #58

Open u2bo opened 7 years ago

u2bo commented 7 years ago

I used default set Build context folder $WORKSPACE My Dockerfile used ADD command not working! It's like this:

ADD ./target/*hybrid/*.war $TOMCAT_WEB_ROOT/test-rest.war

ERROR: Build step failed with exception java.lang.RuntimeException: com.github.dockerjava.api.exception.DockerClientException: Could not build image: No source files were specified

if i used docker build Dockerfile it's success!

docker build -t localhost/library/testr:bata -f /var/jenkins_home/workspace/test/docker/Dockerfile /var/jenkins_home/workspace/test the Build context folder not working?

Jenkins 2.32.2 docker 1.12.0

subinksankaran commented 6 years ago

Any update on this issue. Facing the same issue. Build context folder is set to $WORKSPACE and all files needed in the docker build is placed in that location. Docker build is picking up the Dockerfile from $WORKSPACE . But build is failing in the second COPY step stating file to be copied not found. The file needed in COPY step is placed in same location as Dockerfile. But docker looks for the file in "/var/lib/docker/tmp/docker-builder919306703/" instead of $WORKSPACE