Docker Community Forums

Share and learn in the Docker community.

Docker build problem

build
docker

(Grogancolin) #1

Hi,

I’m having an issue where docker build --rm --no-cache is failing.
It gets so far through the Sending build context to Docker daemon phase and then crashes with error:

Error: mkdir /var/lib/docker/tmp/docker-build940680692: no such file or directory

Any ideas?

Thanks in advance!

Relevant output - from Jenkins log:

2015-12-01T10:30:16.818 Sending build context to Docker daemon 534.5 kB
Sending build context to Docker daemon 1.092 MB
Sending build context to Docker daemon 1.649 MB
Sending build context to Docker daemon 2.206 MB
Sending build context to Docker daemon 2.763 MB
Sending build context to Docker daemon 3.32 MB
Sending build context to Docker daemon 3.877 MB
Sending build context to Docker daemon 4.434 MB
Sending build context to Docker daemon 4.991 MB
Sending build context to Docker daemon 5.548 MB
Sending build context to Docker daemon 6.105 MB
Sending build context to Docker daemon 6.662 MB
Sending build context to Docker daemon 7.219 MB
Sending build context to Docker daemon 7.776 MB
Sending build context to Docker daemon 8.333 MB
Sending build context to Docker daemon 8.89 MB
2015/12/01 10:30:16 Error: mkdir /var/lib/docker/tmp/docker-build940680692: no such file or directory
2015-12-01T10:30:16.835 ERROR processing jenkins_slave_ccs: docker build --rm --no-cache -t pipeline/jenkins_slave_ccs . FAILED, exit code 1


(Jeff Anderson) #2

Could it be a disk usage issue? I could see a full disk or full devicemapper volume causing strange issues like this.

You mentioned this is a jenkins log-- how is jenkins calling docker? is it a normal docker daemon, or is it a docker-in-docker daemon?


(Binhex) #3

i dont believe its a disk usage issue, as this docker container has the dm.basesize flag setting it to 40GB, i can confirm this with a df -h.

one thing to note is that if i docker exec into the running container then i can successfully issue the same docker build command and it successfully builds the image with no issues, very odd!.

as to your question regards jenkins, this is building an image from within a docker jenkins slave, as in a docker container running the jenkins slave agent, so yes its docker in docker.

any suggestions very welcome, as colin and myself have exhausted all ideas.