aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorUrvashi Mohnani <umohnani@redhat.com>2018-11-07 08:53:10 +0000
committerUrvashi Mohnani <umohnani@redhat.com>2018-11-08 15:22:29 +0000
commit35438b6c86edf19916daa0ca031af57d3f1fcf2b (patch)
tree97ac719890f22bec7835ff9e45f85a1a94c9b80e /cmd/podman
parent85dbfb33f4c20ca75c86abd687fe0f8a31ce080e (diff)
downloadpodman-35438b6c86edf19916daa0ca031af57d3f1fcf2b.tar.gz
podman-35438b6c86edf19916daa0ca031af57d3f1fcf2b.tar.bz2
podman-35438b6c86edf19916daa0ca031af57d3f1fcf2b.zip
Set --force-rm for podman build to true by default
Since we use buildah containers for the build process, the user will not know if we have any buildah containers lingering due to a failed build. Setting this to true by default till we figure out a better way to solve this. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
Diffstat (limited to 'cmd/podman')
-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") {