-
Notifications
You must be signed in to change notification settings - Fork 134
Description
Description
In Docker for Mac 4.57 and 4.58, simply changing the Access Time value for a file that's tracked by a watch: directive in docker-compose.yml causes that file to be synced into the container as if it had changed. This also triggers sync+restart and even rebuild, which is the real problem.
Simply looking at a file in certain programs changes that Access Time, and if it's your project's uv.lock file, that causes docker compose watch to completely rebuild the image, wasting several minutes of work for no reason.
Reproduce
- Run
docker compose watchwith a docker-compose.yml file that's set up to watch a certain file with theaction: rebuilddirective. For this example, I'll use the fileuv.lock. - On the host, run
touch -a uv.lock.
This incorrectly triggers a rebuild of the entire image. This also happens when using docker compose up --watch.
Expected behavior
Simply changing the Access Time should never be treated as the file having been modified, as that just means the file was read at that time, not edited.
docker version
Client: Docker Engine - Community
Version: 29.1.5
API version: 1.52
Go version: go1.25.6
Git commit: 0e6fee6c52
Built: Tue Dec 16 15:33:03 2025
OS/Arch: darwin/arm64
Context: desktop-linux
Server: Docker Desktop 4.57.0 (215387)
Engine:
Version: 29.1.3
API version: 1.52 (minimum version 1.44)
Go version: go1.25.5
Git commit: fbf3ed2
Built: Fri Dec 12 14:50:40 2025
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: v2.2.1
GitCommit: dea7da592f5d1d2b7755e3a161be07f43fad8f75
runc:
Version: 1.3.4
GitCommit: v1.3.4-0-gd6d73eb8
docker-init:
Version: 0.19.0
GitCommit: de40ad0docker info
Client: Docker Engine - Community
Version: 29.1.5
Context: desktop-linux
Debug Mode: false
Plugins:
ai: Docker AI Agent - Ask Gordon (Docker Inc.)
Version: v1.17.1
Path: /Users/rrollins/.docker/cli-plugins/docker-ai
buildx: Docker Buildx (Docker Inc.)
Version: v0.30.1-desktop.1
Path: /Users/rrollins/.docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v5.0.1
Path: /Users/rrollins/.docker/cli-plugins/docker-compose
debug: Get a shell into any image or container (Docker Inc.)
Version: 0.0.47
Path: /Users/rrollins/.docker/cli-plugins/docker-debug
desktop: Docker Desktop commands (Docker Inc.)
Version: v0.2.0
Path: /Users/rrollins/.docker/cli-plugins/docker-desktop
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.31
Path: /Users/rrollins/.docker/cli-plugins/docker-extension
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v1.4.0
Path: /Users/rrollins/.docker/cli-plugins/docker-init
mcp: Docker MCP Plugin (Docker Inc.)
Version: v0.35.0
Path: /Users/rrollins/.docker/cli-plugins/docker-mcp
model: Docker Model Runner (Docker Inc.)
Version: v1.0.6
Path: /Users/rrollins/.docker/cli-plugins/docker-model
offload: Docker Offload (Docker Inc.)
Version: v0.5.40
Path: /Users/rrollins/.docker/cli-plugins/docker-offload
pass: Docker Pass Secrets Manager Plugin (beta) (Docker Inc.)
Version: v0.0.22
Path: /Users/rrollins/.docker/cli-plugins/docker-pass
sandbox: Docker Sandbox (Docker Inc.)
Version: v0.9.0
Path: /Users/rrollins/.docker/cli-plugins/docker-sandbox
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
Version: 0.6.0
Path: /Users/rrollins/.docker/cli-plugins/docker-sbom
scout: Docker Scout (Docker Inc.)
Version: v1.19.0
Path: /Users/rrollins/.docker/cli-plugins/docker-scout
Server:
Containers: 6
Running: 6
Paused: 0
Stopped: 0
Images: 101
Server Version: 29.1.3
Storage Driver: overlayfs
driver-type: io.containerd.snapshotter.v1
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
CDI spec directories:
/etc/cdi
/var/run/cdi
Discovered Devices:
cdi: docker.com/gpu=webgpu
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: dea7da592f5d1d2b7755e3a161be07f43fad8f75
runc version: v1.3.4-0-gd6d73eb8
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.12.54-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: aarch64
CPUs: 12
Total Memory: 7.653GiB
Name: docker-desktop
ID: 42077820-6f80-461d-86a1-c7cb9ef0c903
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Labels:
com.docker.desktop.address=unix:///Users/rrollins/Library/Containers/com.docker.docker/Data/docker-cli.sock
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5555
::1/128
127.0.0.0/8
Live Restore Enabled: false
Firewall Backend: iptablesDiagnostics ID
8E914AE0-F5B6-4813-ADCA-C8047D7A156F/20260129231625
Additional Info
This problem doesn't occur in Docker for Mac 4.56 or 4.55. I haven't tested any earlier, but I'm guessing they're fine.
I am on MacOS Tahoe 26.2 (25C56).