From 7462ebe830b256e9e145d133c824de5dfd23045d Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 3 Aug 2018 07:27:33 -0400 Subject: Vendor in latest github.com/projectatomic/buildah This adds support for Dockerfile.in and fixes some limits issues on docker build Also adds support for podman build to read Dockerfile from stdin. cat Dockerfile | podman build -f - . Signed-off-by: Daniel J Walsh Closes: #1209 Approved by: mheon --- cmd/podman/build.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/podman/build.go b/cmd/podman/build.go index ab39003bc..b8e586811 100644 --- a/cmd/podman/build.go +++ b/cmd/podman/build.go @@ -29,6 +29,18 @@ var ( } ) +func getDockerfiles(files []string) []string { + var dockerfiles []string + for _, f := range files { + if f == "-" { + dockerfiles = append(dockerfiles, "/dev/stdin") + } else { + dockerfiles = append(dockerfiles, f) + } + } + return dockerfiles +} + func buildCmd(c *cli.Context) error { // The following was taken directly from projectatomic/buildah/cmd/bud.go // TODO Find a away to vendor more of this in rather than copy from bud @@ -62,7 +74,7 @@ func buildCmd(c *cli.Context) error { } } - dockerfiles := c.StringSlice("file") + dockerfiles := getDockerfiles(c.StringSlice("file")) format := "oci" if c.IsSet("format") { format = strings.ToLower(c.String("format")) -- cgit v1.2.3-54-g00ecf