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
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.
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
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
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
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…
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.