summaryrefslogtreecommitdiff
path: root/cmd/podman/build.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-08-03 07:27:33 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-03 14:39:07 +0000
commit7462ebe830b256e9e145d133c824de5dfd23045d (patch)
treed545bb2b4c579108e5fb3ecf2717146a182e65cd /cmd/podman/build.go
parenta83f54e9c703630ee95e76b1dac3ad375c44c222 (diff)
downloadpodman-7462ebe830b256e9e145d133c824de5dfd23045d.tar.gz
podman-7462ebe830b256e9e145d133c824de5dfd23045d.tar.bz2
podman-7462ebe830b256e9e145d133c824de5dfd23045d.zip
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 <dwalsh@redhat.com> Closes: #1209 Approved by: mheon
Diffstat (limited to 'cmd/podman/build.go')
-rw-r--r--cmd/podman/build.go14
1 files changed, 13 insertions, 1 deletions
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"))