summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2022-02-02 13:48:27 -0500
committerNalin Dahyabhai <nalin@redhat.com>2022-02-02 14:05:20 -0500
commit725a6f8939de5323eb3abebd80e5b2fabcb16662 (patch)
treeaa3a7d6f1f01bd68eac9675a94ba47ea400ee869 /pkg
parent21a8ee904465b1aa54ce5fa6e3bbf93519ca0442 (diff)
downloadpodman-725a6f8939de5323eb3abebd80e5b2fabcb16662.tar.gz
podman-725a6f8939de5323eb3abebd80e5b2fabcb16662.tar.bz2
podman-725a6f8939de5323eb3abebd80e5b2fabcb16662.zip
pkg/bindings/images.Build(): slashify "dockerfile" values, too
When the Dockerfile isn't in the root directory of the build context, the client supplies its pathname to the server, but it needs to do so using "/" as the path separator, not the client OS's path separator. CI can't test Windows clients, so [NO NEW TESTS NEEDED] Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/bindings/images/build.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go
index b7220f5c5..a363f2c6e 100644
--- a/pkg/bindings/images/build.go
+++ b/pkg/bindings/images/build.go
@@ -332,7 +332,7 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
}
tarContent := []string{options.ContextDirectory}
- newContainerFiles := []string{}
+ newContainerFiles := []string{} // dockerfile paths, relative to context dir, ToSlash()ed
dontexcludes := []string{"!Dockerfile", "!Containerfile", "!.dockerignore", "!.containerignore"}
for _, c := range containerFiles {
@@ -380,7 +380,7 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
tarContent = append(tarContent, containerfile)
}
}
- newContainerFiles = append(newContainerFiles, containerfile)
+ newContainerFiles = append(newContainerFiles, filepath.ToSlash(containerfile))
}
if len(newContainerFiles) > 0 {
cFileJSON, err := json.Marshal(newContainerFiles)