diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-12-09 14:58:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-09 14:58:28 -0500 |
commit | 6db3e9bfeb39e26bf6c211328c77bd847ff140f5 (patch) | |
tree | 2baa1845c8d5ebe92f0772ba3116e81b6ab03251 /cmd/podman/images/build.go | |
parent | da062b5bd03dd88060eb91c7d02936d5e7427cb9 (diff) | |
parent | 0154f9e9b3d158dce901c9f19261714660a2f27b (diff) | |
download | podman-6db3e9bfeb39e26bf6c211328c77bd847ff140f5.tar.gz podman-6db3e9bfeb39e26bf6c211328c77bd847ff140f5.tar.bz2 podman-6db3e9bfeb39e26bf6c211328c77bd847ff140f5.zip |
Merge pull request #8653 from rhatdan/buildah
Honor the --layers flag
Diffstat (limited to 'cmd/podman/images/build.go')
-rw-r--r-- | cmd/podman/images/build.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go index 48b355ecd..fbea1e3d8 100644 --- a/cmd/podman/images/build.go +++ b/cmd/podman/images/build.go @@ -116,6 +116,7 @@ func buildFlags(cmd *cobra.Command) { // --layers flag flag = layerFlags.Lookup("layers") useLayersVal := useLayers() + buildOpts.Layers = useLayersVal == "true" if err := flag.Value.Set(useLayersVal); err != nil { logrus.Errorf("unable to set --layers to %v: %v", useLayersVal, err) } @@ -275,11 +276,7 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil } } } - // Check to see if the BUILDAH_LAYERS environment variable is set and - // override command-line. - if _, ok := os.LookupEnv("BUILDAH_LAYERS"); ok { - flags.Layers = true - } + flags.Layers = buildOpts.Layers // `buildah bud --layers=false` acts like `docker build --squash` does. // That is all of the new layers created during the build process are |