mirror of
https://github.com/containers/podman.git
synced 2025-12-03 19:59:39 +08:00
Vendor in latest buildah code
This will add --layers support. Also add missing information in man pages on podman build features. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #938 Approved by: umohnani8
This commit is contained in:
committed by
Atomic Bot
parent
95ea3d4f3a
commit
be217caa38
20
vendor/github.com/projectatomic/buildah/pkg/cli/common.go
generated
vendored
20
vendor/github.com/projectatomic/buildah/pkg/cli/common.go
generated
vendored
@@ -5,6 +5,10 @@ package cli
|
||||
// that vendor in this code can use them too.
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/opencontainers/runtime-spec/specs-go"
|
||||
"github.com/projectatomic/buildah"
|
||||
"github.com/projectatomic/buildah/util"
|
||||
@@ -119,9 +123,13 @@ var (
|
||||
Name: "label",
|
||||
Usage: "Set metadata for an image (default [])",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "layers",
|
||||
Usage: fmt.Sprintf("cache intermediate layers during build (default %t)", UseLayers()),
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "no-cache",
|
||||
Usage: "Do not use caching for the container build. The build process does not currently support caching so this is a NOOP.",
|
||||
Usage: "Do not use existing cached images for the container build. Build from the start with a new set of cached layers.",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "logfile",
|
||||
@@ -230,3 +238,13 @@ var (
|
||||
},
|
||||
}, usernsFlags...), NamespaceFlags...)
|
||||
)
|
||||
|
||||
// UseLayers returns true if BUILDAH_LAYERS is set to "1" or "true"
|
||||
// otherwise it returns false
|
||||
func UseLayers() bool {
|
||||
layers := os.Getenv("BUILDAH_LAYERS")
|
||||
if strings.ToLower(layers) == "true" || layers == "1" {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user