Be sure to copy exact folder structure when generating final images

'COPY *' has a different behavior than 'COPY .' - when regexes are
involved, COPY behave differently, by unpacking directory content to the
root.

Enhance unit test to cover the scenario as well
This commit is contained in:
Ettore Di Giacinto
2021-02-09 18:05:13 +01:00
parent 544895e051
commit 4d9297e3da
2 changed files with 11 additions and 1 deletions

View File

@@ -248,7 +248,7 @@ func (a *PackageArtifact) SetPath(p string) {
func (a *PackageArtifact) genDockerfile() string {
return `
FROM scratch
COPY * /`
COPY . /`
}
// CreateArtifactForFile creates a new artifact from the given file