summaryrefslogtreecommitdiff
path: root/cmd/podman/images
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/images')
-rw-r--r--cmd/podman/images/build.go14
-rw-r--r--cmd/podman/images/prune.go5
-rw-r--r--cmd/podman/images/utils_linux.go4
3 files changed, 12 insertions, 11 deletions
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go
index 642da0c83..4c563ed27 100644
--- a/cmd/podman/images/build.go
+++ b/cmd/podman/images/build.go
@@ -131,7 +131,7 @@ func buildFlags(cmd *cobra.Command) {
// --pull flag
flag := budFlags.Lookup("pull")
if err := flag.Value.Set("true"); err != nil {
- logrus.Errorf("unable to set --pull to true: %v", err)
+ logrus.Errorf("Unable to set --pull to true: %v", err)
}
flag.DefValue = "true"
flag.Usage = "Always attempt to pull the image (errors are fatal)"
@@ -148,13 +148,13 @@ func buildFlags(cmd *cobra.Command) {
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)
+ logrus.Errorf("Unable to set --layers to %v: %v", useLayersVal, err)
}
flag.DefValue = useLayersVal
// --force-rm flag
flag = layerFlags.Lookup("force-rm")
if err := flag.Value.Set("true"); err != nil {
- logrus.Errorf("unable to set --force-rm to true: %v", err)
+ logrus.Errorf("Unable to set --force-rm to true: %v", err)
}
flag.DefValue = "true"
flags.AddFlagSet(&layerFlags)
@@ -162,7 +162,7 @@ func buildFlags(cmd *cobra.Command) {
// FromAndBud flags
fromAndBudFlags, err := buildahCLI.GetFromAndBudFlags(&buildOpts.FromAndBudResults, &buildOpts.UserNSResults, &buildOpts.NameSpaceResults)
if err != nil {
- logrus.Errorf("error setting up build flags: %v", err)
+ logrus.Errorf("Setting up build flags: %v", err)
os.Exit(1)
}
// --http-proxy flag
@@ -171,7 +171,7 @@ func buildFlags(cmd *cobra.Command) {
flag = fromAndBudFlags.Lookup("http-proxy")
buildOpts.HTTPProxy = false
if err := flag.Value.Set("false"); err != nil {
- logrus.Errorf("unable to set --https-proxy to %v: %v", false, err)
+ logrus.Errorf("Unable to set --https-proxy to %v: %v", false, err)
}
flag.DefValue = "false"
}
@@ -184,7 +184,7 @@ func buildFlags(cmd *cobra.Command) {
flag = flags.Lookup("isolation")
buildOpts.Isolation = buildahDefine.OCI
if err := flag.Value.Set(buildahDefine.OCI); err != nil {
- logrus.Errorf("unable to set --isolation to %v: %v", buildahDefine.OCI, err)
+ logrus.Errorf("Unable to set --isolation to %v: %v", buildahDefine.OCI, err)
}
flag.DefValue = buildahDefine.OCI
_ = flags.MarkHidden("disable-content-trust")
@@ -228,7 +228,7 @@ func build(cmd *cobra.Command, args []string) error {
// Delete it later.
defer func() {
if err = os.RemoveAll(tempDir); err != nil {
- logrus.Errorf("error removing temporary directory %q: %v", contextDir, err)
+ logrus.Errorf("Removing temporary directory %q: %v", contextDir, err)
}
}()
contextDir = filepath.Join(tempDir, subDir)
diff --git a/cmd/podman/images/prune.go b/cmd/podman/images/prune.go
index 8a484495a..6c39e5c69 100644
--- a/cmd/podman/images/prune.go
+++ b/cmd/podman/images/prune.go
@@ -41,6 +41,7 @@ func init() {
flags := pruneCmd.Flags()
flags.BoolVarP(&pruneOpts.All, "all", "a", false, "Remove all images not in use by containers, not just dangling ones")
+ flags.BoolVarP(&pruneOpts.External, "external", "", false, "Remove images even when they are used by external containers (e.g., by build containers)")
flags.BoolVarP(&force, "force", "f", false, "Do not prompt for confirmation")
filterFlagName := "filter"
@@ -80,7 +81,7 @@ func prune(cmd *cobra.Command, args []string) error {
func createPruneWarningMessage(pruneOpts entities.ImagePruneOptions) string {
question := "Are you sure you want to continue? [y/N] "
if pruneOpts.All {
- return "WARNING! This will remove all images without at least one container associated to them.\n" + question
+ return "WARNING! This command removes all images without at least one container associated with them.\n" + question
}
- return "WARNING! This will remove all dangling images.\n" + question
+ return "WARNING! This command removes all dangling images.\n" + question
}
diff --git a/cmd/podman/images/utils_linux.go b/cmd/podman/images/utils_linux.go
index 5521abab4..f7c159415 100644
--- a/cmd/podman/images/utils_linux.go
+++ b/cmd/podman/images/utils_linux.go
@@ -24,7 +24,7 @@ func setupPipe() (string, func() <-chan error, error) {
err = unix.Mkfifo(pipePath, 0600)
if err != nil {
if e := os.RemoveAll(pipeDir); e != nil {
- logrus.Errorf("error removing named pipe: %q", e)
+ logrus.Errorf("Removing named pipe: %q", e)
}
return "", nil, errors.Wrapf(err, "error creating named pipe")
}
@@ -40,7 +40,7 @@ func setupPipe() (string, func() <-chan error, error) {
}()
return pipePath, func() <-chan error {
if e := os.RemoveAll(pipeDir); e != nil {
- logrus.Errorf("error removing named pipe: %q", e)
+ logrus.Errorf("Removing named pipe: %q", e)
}
return errc
}, nil