diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2018-08-28 09:39:47 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-29 14:27:11 +0000 |
commit | eb5fdebc84e59f8645218f8fdfd6e6a8136cfa43 (patch) | |
tree | b1625395d2cb3ca26ba85c3e418ce36edcea27af /cmd/podman/common.go | |
parent | 6a46af571e70fd49655fe97df93391500933b2d1 (diff) | |
download | podman-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/common.go')
-rw-r--r-- | cmd/podman/common.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cmd/podman/common.go b/cmd/podman/common.go index d9216850f..797e74c98 100644 --- a/cmd/podman/common.go +++ b/cmd/podman/common.go @@ -10,6 +10,7 @@ import ( "github.com/containers/storage" "github.com/fatih/camelcase" "github.com/pkg/errors" + "github.com/projectatomic/buildah" "github.com/urfave/cli" ) @@ -406,3 +407,15 @@ var createFlags = []cli.Flag{ Usage: "Working `directory inside the container", }, } + +func getFormat(c *cli.Context) (string, error) { + format := strings.ToLower(c.String("format")) + if strings.HasPrefix(format, buildah.OCI) { + return buildah.OCIv1ImageManifest, nil + } + + if strings.HasPrefix(format, buildah.DOCKER) { + return buildah.Dockerv2ImageManifest, nil + } + return "", errors.Errorf("unrecognized image type %q", format) +} |