Docker Community Forums

Share and learn in the Docker community.

COPY from_file to to_file invalidates cache, despite no changes. Cloud Only Bug

One of my repo’s is erroneously invalidating its cache.

This is currently happening when copying a file with
COPY ./django_api/requirements.txt requirements.txt

However there are no changes to the requirements file. I have also ran a checksum against it and the other contents of the repo. The checksums all match between builds. If I remove the COPY statement, the previous ENV statement then starts to invalidate the cache. More importantly this only occurs on docker cloud, the cache works as it should on Docker for Mac.

This has been going on for months. Initially it all worked, and then there was some incident during summer in which I believe other users where effected from a similar issue. However a rep responding saying they were working on the case. (Unfortunately I cant currently find the topic that this was posted in). So I give it a few days, but it never corrected itself. Its now been several months and there are still issues. The repo has had a colourful history, during that time I also tried deleting it, but when I recreated it, the old history was still there. So I tried deleting it and leaving it a week, but upon recreation the old build history appears again.

I believe the repo has gotten into a bad state and wondering if technical support would be able to wipe it clean.

Over the months I have spent several days looking into this, and am certain it must be a bug on Docker Cloud. If anybody has any tips on how to prove otherwise that would be great.

Cheers,
Emmet

Cloning into '.'...
Warning: Permanently added the RSA host key for IP address '18.205.93.2' to the list of known hosts.
Checking out files: 10% (313/2886) Checking out files: 11% (318/2886) Checking out files: 12% (347/2886) Checking out files: 13% (376/2886) Checking out files: 14% (405/2886) Checking out files: 15% (433/2886) Checking out files: 16% (462/2886) Checking out files: 17% (491/2886) Checking out files: 18% (520/2886) Checking out files: 19% (549/2886) Checking out files: 20% (578/2886) Checking out files: 21% (607/2886) Checking out files: 22% (635/2886) Checking out files: 23% (664/2886) Checking out files: 24% (693/2886) Checking out files: 25% (722/2886) Checking out files: 26% (751/2886) Checking out files: 27% (780/2886) Checking out files: 28% (809/2886) Checking out files: 29% (837/2886) Checking out files: 30% (866/2886) Checking out files: 31% (895/2886) Checking out files: 32% (924/2886) Checking out files: 33% (953/2886) Checking out files: 34% (982/2886) Checking out files: 35% (1011/2886) Checking out files: 35% (1013/2886) Checking out files: 36% (1039/2886) Checking out files: 37% (1068/2886) Checking out files: 38% (1097/2886) Checking out files: 39% (1126/2886) Checking out files: 40% (1155/2886) Checking out files: 41% (1184/2886) Checking out files: 42% (1213/2886) Checking out files: 43% (1241/2886) Checking out files: 44% (1270/2886) Checking out files: 45% (1299/2886) Checking out files: 46% (1328/2886) Checking out files: 47% (1357/2886) Checking out files: 48% (1386/2886) Checking out files: 49% (1415/2886) Checking out files: 50% (1443/2886) Checking out files: 51% (1472/2886) Checking out files: 52% (1501/2886) Checking out files: 53% (1530/2886) Checking out files: 54% (1559/2886) Checking out files: 55% (1588/2886) Checking out files: 56% (1617/2886) Checking out files: 57% (1646/2886) Checking out files: 58% (1674/2886) Checking out files: 59% (1703/2886) Checking out files: 60% (1732/2886) Checking out files: 61% (1761/2886) Checking out files: 62% (1790/2886) Checking out files: 63% (1819/2886) Checking out files: 64% (1848/2886) Checking out files: 65% (1876/2886) Checking out files: 66% (1905/2886) Checking out files: 67% (1934/2886) Checking out files: 68% (1963/2886) Checking out files: 69% (1992/2886) Checking out files: 70% (2021/2886) Checking out files: 71% (2050/2886) Checking out files: 71% (2051/2886) Checking out files: 72% (2078/2886) Checking out files: 73% (2107/2886) Checking out files: 74% (2136/2886) Checking out files: 75% (2165/2886) Checking out files: 76% (2194/2886) Checking out files: 77% (2223/2886) Checking out files: 78% (2252/2886) Checking out files: 79% (2280/2886) Checking out files: 80% (2309/2886) Checking out files: 81% (2338/2886) Checking out files: 82% (2367/2886) Checking out files: 83% (2396/2886) Checking out files: 84% (2425/2886) Checking out files: 85% (2454/2886) Checking out files: 86% (2482/2886) Checking out files: 87% (2511/2886) Checking out files: 88% (2540/2886) Checking out files: 89% (2569/2886) Checking out files: 90% (2598/2886) Checking out files: 91% (2627/2886) Checking out files: 92% (2656/2886) Checking out files: 93% (2684/2886) Checking out files: 94% (2713/2886) Checking out files: 95% (2742/2886) Checking out files: 96% (2771/2886) Checking out files: 97% (2800/2886) Checking out files: 98% (2829/2886) Checking out files: 99% (2858/2886) Checking out files: 100% (2886/2886) Checking out files: 100% (2886/2886), done.
Switched to a new branch '1.3.5'
Pulling cache layers for index.docker.io/saltdna/portal:latest...
Done!
KernelVersion: 4.4.0-1060-aws
Components: [{u'Version': u'18.03.1-ee-3', u'Name': u'Engine', u'Details': {u'KernelVersion': u'4.4.0-1060-aws', u'Os': u'linux', u'BuildTime': u'2018-08-30T18:42:30.000000000+00:00', u'ApiVersion': u'1.37', u'MinAPIVersion': u'1.12', u'GitCommit': u'b9a5c95', u'Arch': u'amd64', u'Experimental': u'false', u'GoVersion': u'go1.10.2'}}]
Arch: amd64
BuildTime: 2018-08-30T18:42:30.000000000+00:00
ApiVersion: 1.37
Platform: {u'Name': u''}
Version: 18.03.1-ee-3
MinAPIVersion: 1.12
GitCommit: b9a5c95
Os: linux
GoVersion: go1.10.2
Starting build of index.docker.io/saltdna/portal:latest...
Step 1/27 : FROM python:2.7-alpine3.7 as build
---> ec0218200ad6
Step 2/27 : ENV PYTHONDONTWRITEBYTECODE 1
---> Using cache
---> fdb003ff6fe8
Step 3/27 : ENV PYTHONUNBUFFERED 1
---> Using cache
---> 84ac44fd8f0f
Step 4/27 : COPY ./django_api/requirements.txt requirements.txt
---> d702f40c6934
Step 5/27 : RUN apk add --no-cache --virtual .build-deps g++ make mariadb-dev libffi-dev jpeg-dev && pip uninstall -y wheel && pip install --user -r requirements.txt && cp /usr/lib/libmysqlclient.so.18 /usr/lib/libmysqlclient.so.18.bak && apk del .build-deps
---> Running in a3534a7e1476
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
(1/30) Upgrading musl (1.1.18-r3 -> 1.1.18-r4)