You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: container build ignores default/relative build context in mktemp directory, but works with absolute path #1899
Hi! I'd love to work on this.
Since this is happening on macOS with mktemp -d, I suspect this is a symlink resolution issue. macOS maps /var to /private/var, so when the context is passed implicitly (.), the path archiver might be failing a strict string comparison without evaluating the symlink first.
I can investigate and put together a fix. Could you assign this to me?
Hey @am-saksham! I was actually just trying to fix some of the failing integration tests (like testBuildSymlink and testCopyRenameFromStage) in the TestCLIBuilderSerial test suite. While debugging why those tests were failing, I ended up tracking down the root cause in URL+Extensions and BuildFSSync and realized it's the exact same bug causing this mktemp issue! I just opened #1922 to get the test suite green again, which resolves this issue as a side effect. Feel free to review it!
The first build (real path, no symlink) succeeds. The second — identical
files, reached through a symlinked directory component (linked -> deep)
instead of the real path — fails with an empty build context:
#3 [internal] load .dockerignore
#3 transferring context: 2B done
#4 [internal] load build context
#4 transferring context: 2B done
#5 [linux/arm64/v8 1/2] COPY helloworld.txt /helloworld.txt
#5 ERROR: failed to calculate checksum of ref ...: "/helloworld.txt": not found
Same signature as the original report here — "load build context" transfers
essentially nothing and the subsequent COPY/ADD fails with "not found".
Reproduces every time, on both released v1.1.0 (commit 5973b9c) and current main (commit 90be187 — the relevant source is unchanged between the two).
Environment
- OS: macOS 26.3.1 (25D2128)
- Xcode: 26.6 (17F113)
- Container: container CLI version 1.1.0 (build: release, commit: 5973b9c)
(also reproduced building main @ 90be187 locally)
Activity
am-saksham commentedon Jul 6, 2026
Hi! I'd love to work on this.
Since this is happening on macOS with
mktemp -d, I suspect this is a symlink resolution issue. macOS maps/varto/private/var, so when the context is passed implicitly (.), the path archiver might be failing a strict string comparison without evaluating the symlink first.I can investigate and put together a fix. Could you assign this to me?
lakshitsoni26 commentedon Jul 8, 2026
Hey @am-saksham! I was actually just trying to fix some of the failing integration tests (like
testBuildSymlinkandtestCopyRenameFromStage) in theTestCLIBuilderSerialtest suite. While debugging why those tests were failing, I ended up tracking down the root cause inURL+ExtensionsandBuildFSSyncand realized it's the exact same bug causing thismktempissue! I just opened #1922 to get the test suite green again, which resolves this issue as a side effect. Feel free to review it!svelez commentedon Jul 21, 2026
I hit a variant of this that's worth flagging before #1922 gets merged as the fix, since #1922 only covers part of this bug class.
Minimal repro (no
mktempneeded):The first build (real path, no symlink) succeeds. The second — identical
files, reached through a symlinked directory component (
linked -> deep)instead of the real path — fails with an empty build context:
Same signature as the original report here — "load build context" transfers
essentially nothing and the subsequent
COPY/ADDfails with "not found".Reproduces every time, on both released v1.1.0 (commit
5973b9c) and currentmain(commit90be187— the relevant source is unchanged between the two).Environment
jglogan commentedon Jul 22, 2026
This issue (both examples) should be fixed in the upcoming release.
jakubkaczor commentedon Oct 2, 2026
I can no longer reproduce on the version 1.4.1, so I’m closing this issue. Thanks.