summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-11-16 03:04:58 -0800
committerGitHub <noreply@github.com>2018-11-16 03:04:58 -0800
commit53c47b9061bcee28c1777c331ab6ede2a7e0dc37 (patch)
tree4693ef06b604f1493cff0de3668cb3e494102251 /cmd
parent236408bbbc14f6b637c4e9be19093d1a37b83f9c (diff)
parent35438b6c86edf19916daa0ca031af57d3f1fcf2b (diff)
downloadpodman-53c47b9061bcee28c1777c331ab6ede2a7e0dc37.tar.gz
podman-53c47b9061bcee28c1777c331ab6ede2a7e0dc37.tar.bz2
podman-53c47b9061bcee28c1777c331ab6ede2a7e0dc37.zip
Merge pull request #1769 from umohnani8/build
Set --force-rm for podman build to true by default
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/build.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/cmd/podman/build.go b/cmd/podman/build.go
index 14bf226f9..880cb892f 100644
--- a/cmd/podman/build.go
+++ b/cmd/podman/build.go
@@ -1,6 +1,11 @@
package main
import (
+ "io/ioutil"
+ "os"
+ "path/filepath"
+ "strings"
+
"github.com/containers/buildah"
"github.com/containers/buildah/imagebuildah"
buildahcli "github.com/containers/buildah/pkg/cli"
@@ -10,15 +15,15 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
- "io/ioutil"
- "os"
- "path/filepath"
- "strings"
)
var (
layerFlags = []cli.Flag{
cli.BoolTFlag{
+ Name: "force-rm",
+ Usage: "Always remove intermediate containers after a build, even if the build is unsuccessful. (default true)",
+ },
+ cli.BoolTFlag{
Name: "layers",
Usage: "cache intermediate layers during build. Use BUILDAH_LAYERS environment variable to override. ",
},
@@ -230,7 +235,7 @@ func buildCmd(c *cli.Context) error {
Layers: layers,
NoCache: c.Bool("no-cache"),
RemoveIntermediateCtrs: c.BoolT("rm"),
- ForceRmIntermediateCtrs: c.Bool("force-rm"),
+ ForceRmIntermediateCtrs: c.BoolT("force-rm"),
}
if c.Bool("quiet") {