Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard links of files don't invalidate the cache #42718

Open
jgouly opened this issue Aug 6, 2021 · 0 comments
Open

Hard links of files don't invalidate the cache #42718

jgouly opened this issue Aug 6, 2021 · 0 comments
Labels

Comments

@jgouly
Copy link

jgouly commented Aug 6, 2021

Description

If a file that is a hard link is ADDed into a container, the cache is not invalidated when the contents change.

Steps to reproduce the issue:

$ touch a
$ ln a b
$ cat Dockerfile
FROM busybox
ADD b b
CMD md5sum b
$ docker build . -t s && docker run s && md5sum a b
$ # modify a
$ docker build . -t s && docker run s && md5sum a b # this does not rebuild

Describe the results you received:

The container didn't rebuild / invalidate the cache.

Describe the results you expected:

The container to be rebuilt.

Output of docker version:

Docker version 18.09.1, build 4c52b90

Output of docker info:

docker info
Containers: 62
 Running: 0
 Paused: 0
 Stopped: 62
Images: 89
Server Version: 18.09.1
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9754871865f7fe2f4e74d43e2fc7ccd237edcbce
runc version: 1.0.0~rc6+dfsg1-3
init version: v0.18.0 (expected: fec3683b971d9c3ef73f284f176672c44b448662)
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.19.0-16-amd64
Operating System: Debian GNU/Linux 10 (buster)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 483.4MiB
Name: debian
ID: 6S6O:HJAF:IOOU:LCMR:SETE:OJ6V:4TJ6:7SR3:GLJY:QERN:M5YK:6BOT
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants