Skip to content

dockerfile: fix missing source mapping for COPY --link command#4798

Merged
AkihiroSuda merged 1 commit into
moby:masterfrom
tonistiigi:fix-copy-link-sourcemap
Apr 23, 2024
Merged

dockerfile: fix missing source mapping for COPY --link command#4798
AkihiroSuda merged 1 commit into
moby:masterfrom
tonistiigi:fix-copy-link-sourcemap

Conversation

@tonistiigi
Copy link
Copy Markdown
Member

The COPY --link command lost its source mapping to the original Dockerfile when converted to LLB vertex. Regression from cc1499e#diff-905097ba6a4e36b3afbb1204e52315791dc0915f2a845c768bc84c6af5db1e1fR1075 progressgroup PR.

@sipsma The previous code is clearly incorrect as it is copying to nil slice (that does nothing), but do check that I didn't miss any progressgroup logic.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi tonistiigi added this to the v0.13.2 milestone Apr 23, 2024
llb.Platform(*d.platform),
}
copy(copyOpts, fileOpt)
copyOpts = append(copyOpts, fileOpt...)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if there is a linter to catch this kind of common mistake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants