[RESOLVED] Automated docker build fails

After uploading code using Git, i tried creating build using automated docker build and the automated docker build gets failed, please see below image

When i clicked on “Error” links i found following error:

“Build failed: stat /var/lib/docker/overlay/495d836e70d3ca093610283ed0d7c56296d0389b8ddfbded1a787a6047b258ee/merged/run.sh: no such file or directory”

I have never faced this issue, i am using docker hub for creating builds since 3-4 months but all of a sudden 2 days ago i faced this issue.

Strangely when i manually triggered the docker build then it works.

Please help me to fix this issue.

Thanks a lot

3 Likes

I have the same issue with my image ekesken/prom-marathon-exporter

Step 17 : COPY entrypoint.sh /entrypoint.sh
Removing intermediate container 00f723c0bb78
stat /var/lib/docker/overlay/f78b24a91643ab3fcb6848bc73eb12b83d4cd64dc26da6d148d79a96b8f1cfc9/merged/entrypoint.sh: no such file or directory

I can build it on my local without any problem.

Is there any solution to this issue ? No one is answering to this issue

I manually docker login & push from my local as a workaround, waiting for a response from here.

Hi,

We were encountering the same issue across a range of different projects - the one I was using to test was:
coco/coco-provisioner

Builds were working fine locally on Docker version 1.7.1.

We first saw automatic builds start to fail approximately a week ago - sometimes manually re-triggering a build would cause the build to succeed, but not always.

After some investigation, we found that re-ordering our Docker files so that ADD statements were above RUN statements resolved this issue, and automatic builds worked again.

Example commit:

I’m not entirely sure why the ordering matters, but hopefully this might help other people out who have run into the same issue as us. :slight_smile:

Cheers,
Euan

Thanks for the reply, can you please check my docker file as below and suggest something, because i think every ADD command is above RUN command but still automated build fails.

Update aptitude with new repo

RUN apt-get update &&
apt-get install -y git php5-curl curl php5-cli php5-mongo nano rsyslog vim

Add these for the cronJob

ADD files/crontab /etc/crontab
ADD files/start-cron.sh /usr/bin/start-cron.sh
RUN chmod +x /usr/bin/start-cron.sh

Add shell file for parsing

ADD files/cake /usr/bin/cake
RUN chmod +x /usr/bin/cake

ADD run.sh /run.sh

Make ssh dir

RUN mkdir /root/.ssh/

Copy over private key, and set permissions

ADD repo-key /root/.ssh/id_rsa
RUN chmod 400 /root/.ssh/id_rsa

Create known_hosts

RUN touch /root/.ssh/known_hosts && ssh-keyscan -T 60 bitbucket.org >> /root/.ssh/known_hosts
RUN rm -fr /app && git clone -b development git@bitbucket.org:centralpropertyexchange/cpx.server.git /app
RUN mkdir /app/app/tmp && chmod 777 /app/app/tmp;

RUN chmod 755 /*.sh
EXPOSE 80
CMD ["/run.sh"]

I’m also getting a lot of these on my builds for different tags that I can then manually click re-build on and have no problem…

https://hub.docker.com/r/diginc/pi-hole/builds/

Always seems to happen around the same step based off my build histories of my different tags, on a COPY or ADD.

# arm_dev tag failure
Step 27 : COPY ./debian/start.sh /
Removing intermediate container d1de7b364d12
stat /var/lib/docker/overlay/457505d3167200ba018795eadeff15e8567cd4ae290518c173e3d33bb93a85a3/merged/start.sh: no such file or directory

# debian_dev tag failure
Step 5 : ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini

Removing intermediate container 11f3c818c624
stat /var/lib/docker/overlay/5cf631a758c25be9ba20be95dfb34c22eee367df89c8e98c9eda0fe03b3da483/merged/tini: no such file or directory

# aline_dev tag failure
Step 26 : COPY ./alpine/start.sh /
Removing intermediate container 0326dd7f6023
stat /var/lib/docker/overlay/b2d73826ae86e409e4cb1c774e5ca30787a13c23c7e6d3f680b0bdb5015ad652/merged/start.sh: no such file or directory

Same Issue here!

I suspect that not all users gets a steady network mount for the COPY / ADD statements… .

Step 6 : COPY docker-entrypoint.sh /
Removing intermediate container e22f83356fca
stat     /var/lib/docker/overlay/0a0d47a7682a8c6356c421224f411a0e17244b6a53ff14a0015176b421694865/merged/docker-entrypoint.sh: no such file or directory
1 Like

I hit the same issue today… as workaround i build containers manually and pushed to hub

Same problem here, for rapi/psgi. Was getting this:

Build failed: stat /var/lib/docker/overlay/
20c7a92230098328cc28f6c9b62d6b5f19e23b0b462126768aa4e7309cd519dc/merged/rapi_psgi_control.pl:
no such file or directory

This file was one of those added with a COPY command, and already existed…

I tried changing the order of COPY commands to be before RUN as suggested earlier, but this didn’t solve my problem either. The change I was trying to make consisted of adding a new COPY statement. On my first try, I added the statement before existing COPY statements. Moving all of them to before RUN didn’t help, however, on my 3rd attempt I moved the new COPY statement to come after the existing ones, and now it works. So there is an order/layering problem…

Thanks for the feedback. The team is aware of the issue and is actively working on a fix.

3 Likes

Hello.

We also have the problem with the wallabag/wallabag build.

Our error (found here Docker):

Build failed: lchown /var/lib/docker/overlay/af30f1f9e5a8a174e067b71cf4ae520ce4ab3d4a508e64d37da37484f98e21a6/merged/entrypoint.sh: no such file or directory

My builds are working now but not all the time, if i do 5 builds then almost 4 are successful. I think the issue was on docker server and will be resolved soon.

Same annoying problem here : https://hub.docker.com/r/lesspass/nginx/builds/bfigwacsgutraq2wa7dfr9g/ or here : https://hub.docker.com/r/lesspass/backend/builds/ba6rqzk2ido7rbzvuudgsgy/

I think it is still not fixed yet, on saturday again all of my builds gets failed.

Can i ask that if i use manual build then will it be fine?

Thanks
Irshad

+1 Same problem here.

I’m experiencing the same issue.

I have the same issue

The same issue here!

I have the same problem :frowning: