diff --git a/frontend/dockerfile/instructions/commands.go b/frontend/dockerfile/instructions/commands.go index 28b34f68..ed96d7e0 100644 --- a/frontend/dockerfile/instructions/commands.go +++ b/frontend/dockerfile/instructions/commands.go @@ -200,6 +200,11 @@ type CopyCommand struct { // Expand variables func (c *CopyCommand) Expand(expander SingleWordExpander) error { + expandedChown, err := expander(c.Chown) + if err != nil { + return err + } + c.Chown = expandedChown return expandSliceInPlace(c.SourcesAndDest, expander) }