diff --git a/frontend/dockerfile/dockerfile2llb/convert.go b/frontend/dockerfile/dockerfile2llb/convert.go index 6a163c73971c2..c7f501fe15d1c 100644 --- a/frontend/dockerfile/dockerfile2llb/convert.go +++ b/frontend/dockerfile/dockerfile2llb/convert.go @@ -1319,6 +1319,12 @@ func dispatchCopy(d *dispatchState, cfg copyConfig) error { return err } + // handle case for "." path + // using "/" since paths already nomalized to UNIX style + if cfg.params.DestPath == "." { + dest += "/" + } + var copyOpt []llb.CopyOption if cfg.chown != "" {