Skip to content

Commit

Permalink
Merge pull request #4597 from nobiit/patch-1
Browse files Browse the repository at this point in the history
Add --chown and --chmod to commitMessage for ADD/COPY command
  • Loading branch information
tonistiigi authored Feb 8, 2024
2 parents c6efd41 + e091baf commit c8b64d3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frontend/dockerfile/dockerfile2llb/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,16 @@ func dispatchCopy(d *dispatchState, cfg copyConfig) error {
commitMessage.WriteString("COPY")
}

if cfg.parents {
commitMessage.WriteString(" " + "--parents")
}
if cfg.chown != "" {
commitMessage.WriteString(" " + "--chown=" + cfg.chown)
}
if cfg.chmod != "" {
commitMessage.WriteString(" " + "--chmod=" + cfg.chmod)
}

var a *llb.FileAction

for _, src := range cfg.params.SourcePaths {
Expand Down

0 comments on commit c8b64d3

Please sign in to comment.