-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fixes Windows symlinks targets #2239
base: master
Are you sure you want to change the base?
Conversation
Probably |
e93d933
to
ef2de1f
Compare
When building with the output type=oci or type=registry, for Windows symlinks, "Files/" is prepended to the symlink Target, which can break the symlink entirely if it's an absolute path (C:\path\to\file becomes Files\C:\path\to\file), and for relative paths workarounds were needed (path\to\file would become Files\path\to\file, and it would have worked if that path was valid). This problem does not occur when the output type is tar. Removes the "Files/" prefix from the Windows symlinks. Signed-off-by: Claudiu Belu <[email protected]>
ef2de1f
to
8cee9c7
Compare
I've limited this PR to not add the |
It seems that the buildkit applier uses the containerd archive/tar applier [1], which doesn't trim the I have already mentioned in the PR message that the [1] buildkit/util/winlayers/applier.go Line 84 in 1a7c480
[2]
|
What's the status on this? @tonistiigi Was there something you wanted to change here? |
@claudiubelu So you think we should also remove the |
When building with the output
type=oci
ortype=registry
, for Windows symlinks,Files/
is prepended to the symlink Target, which can break the symlink entirely if it's an absolute path (C:\path\to\file
becomesFiles\C:\path\to\file
), and for relative paths workarounds were needed (path\to\file
would becomeFiles\path\to\file
, and it would have worked if that path was valid).This problem does not occur when the output type is tar.
Removes the
Files/
prefix from the Windows symlinks.Fixes: docker/buildx#373