Merge pull request #2672 from tonistiigi/copy-link-state
dockerfile: fix COPY —link to keep previous llb statemaster
commit
b124b0c3f1
|
@ -1076,7 +1076,7 @@ func dispatchCopyFileOp(d *dispatchState, cfg copyConfig) error {
|
|||
fileOpt = append(fileOpt, llb.ProgressGroup(identity.NewID(), prefixCommand(d, name, d.prefixPlatform, &platform, env)))
|
||||
d.cmdIndex--
|
||||
mergeOpt := append(fileOpt, llb.WithCustomName(prefixCommand(d, "LINK "+name, d.prefixPlatform, &platform, env)))
|
||||
d.state = llb.Merge([]llb.State{d.state, llb.Scratch().File(a, fileOpt...)}, mergeOpt...)
|
||||
d.state = d.state.WithOutput(llb.Merge([]llb.State{d.state, llb.Scratch().File(a, fileOpt...)}, mergeOpt...).Output())
|
||||
} else {
|
||||
d.state = d.state.File(a, fileOpt...)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue