summaryrefslogtreecommitdiff
path: root/cmd/podman/build.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-08-28 09:39:47 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-29 14:27:11 +0000
commiteb5fdebc84e59f8645218f8fdfd6e6a8136cfa43 (patch)
treeb1625395d2cb3ca26ba85c3e418ce36edcea27af /cmd/podman/build.go
parent6a46af571e70fd49655fe97df93391500933b2d1 (diff)
downloadpodman-eb5fdebc84e59f8645218f8fdfd6e6a8136cfa43.tar.gz
podman-eb5fdebc84e59f8645218f8fdfd6e6a8136cfa43.tar.bz2
podman-eb5fdebc84e59f8645218f8fdfd6e6a8136cfa43.zip
Vendor in latest projectatomic/buildah
This will help document the defaults in podman build. podman build --help will now show the defaults and mention the environment variables that can be set to change them. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #1364 Approved by: mheon
Diffstat (limited to 'cmd/podman/build.go')
-rw-r--r--cmd/podman/build.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/cmd/podman/build.go b/cmd/podman/build.go
index e35fd10a4..6671c18c7 100644
--- a/cmd/podman/build.go
+++ b/cmd/podman/build.go
@@ -77,16 +77,9 @@ func buildCmd(c *cli.Context) error {
}
dockerfiles := getDockerfiles(c.StringSlice("file"))
- format := "oci"
- if c.IsSet("format") {
- format = strings.ToLower(c.String("format"))
- }
- if strings.HasPrefix(format, "oci") {
- format = imagebuildah.OCIv1ImageFormat
- } else if strings.HasPrefix(format, "docker") {
- format = imagebuildah.Dockerv2ImageFormat
- } else {
- return errors.Errorf("unrecognized image type %q", format)
+ format, err := getFormat(c)
+ if err != nil {
+ return nil
}
contextDir := ""
cliArgs := c.Args()