From 59328a22dbb2fd4bc5a02e08b7845e1044e56693 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Tue, 4 Feb 2020 14:30:59 +0100 Subject: 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 --- cmd/podman/build.go | 4 ---- 1 file changed, 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 } } -- cgit v1.2.3-54-g00ecf