aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Grunert <sgrunert@suse.com>2020-02-04 14:30:59 +0100
committerSascha Grunert <sgrunert@suse.com>2020-02-04 14:47:33 +0100
commit59328a22dbb2fd4bc5a02e08b7845e1044e56693 (patch)
tree35a7029a7bf4b168045d51194ac73c78f9f5f65a
parent28eb296653f78f462c07e3fe6b156bc093ff44c6 (diff)
downloadpodman-59328a22dbb2fd4bc5a02e08b7845e1044e56693.tar.gz
podman-59328a22dbb2fd4bc5a02e08b7845e1044e56693.tar.bz2
podman-59328a22dbb2fd4bc5a02e08b7845e1044e56693.zip
Fix wrong Containerfile location on build
Podman does select the wrong Containerfile if the current working directory contains a Containerfile but we specify one from a different location. Reproducer: ``` > mkdir 1 > echo FROM scratch > Containerfile > echo FROM golang > 1/Containerfile > podman build -f 1/Containerfile -t test STEP 1: FROM scratch ``` Signed-off-by: Sascha Grunert <sgrunert@suse.com>
-rw-r--r--cmd/podman/build.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/cmd/podman/build.go b/cmd/podman/build.go
index 885f2ac51..1fcb98a0e 100644
--- a/cmd/podman/build.go
+++ b/cmd/podman/build.go
@@ -234,10 +234,6 @@ func buildCmd(c *cliconfig.BuildValues) error {
return errors.Wrapf(err, "error determining path to file %q", containerfiles[i])
}
contextDir = filepath.Dir(absFile)
- containerfiles[i], err = filepath.Rel(contextDir, absFile)
- if err != nil {
- return errors.Wrapf(err, "error determining path to file %q", containerfiles[i])
- }
break
}
}