WORKDIR
is not cached by legacy builder with trailing slash
#47627
Labels
area/builder/classic-builder
Issues affecting the classic builder
area/builder
kind/bug
Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.
status/0-triage
version/25.0
Description
In a Dockerfile, when
WORKDIR
is used with a directory with a trailing slash, the resulting image is not cached if using the legacy builder.Reproduce
DOCKER_BUILDKIT=0 docker build . -t test
:WORKDIR
instruction:Expected behavior
During the second run,
Step 2/2
should use the cached image6224b443d3a9
.docker version
Client: Cloud integration: v1.0.35+desktop.11 Version: 25.0.3 API version: 1.44 Go version: go1.21.6 Git commit: 4debf41 Built: Tue Feb 6 21:13:26 2024 OS/Arch: darwin/arm64 Context: desktop-linux Server: Docker Desktop 4.28.0 (139021) Engine: Version: 25.0.3 API version: 1.44 (minimum version 1.24) Go version: go1.21.6 Git commit: f417435 Built: Tue Feb 6 21:14:22 2024 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.6.28 GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb runc: Version: 1.1.12 GitCommit: v1.1.12-0-g51d5e94 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Additional Info
No response
The text was updated successfully, but these errors were encountered: