From beadd2694b048f939cad1f4d32676fca4c84d0bd Mon Sep 17 00:00:00 2001 From: TomSweeneyRedHat Date: Mon, 7 Oct 2019 19:55:56 -0400 Subject: Add squash-all, fix squash option in build Translate the podman build --squash command to podman build --layers=false which has the same functionality as docker build --squash. Add a new option --squash-all which will squash all layers into one. This will be translated to buildah bud --squash for the buildah bud api. Also allow only one option, squash, layers or squash--all to be used per build command. Fixes: https://github.com/containers/buildah/issues/1234 Signed-off-by: TomSweeneyRedHat --- cmd/podman/cliconfig/create.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cmd/podman/cliconfig') diff --git a/cmd/podman/cliconfig/create.go b/cmd/podman/cliconfig/create.go index 5fb2eed10..c27dfbbee 100644 --- a/cmd/podman/cliconfig/create.go +++ b/cmd/podman/cliconfig/create.go @@ -12,13 +12,20 @@ type RunValues struct { PodmanCommand } +// PodmanBuildResults represents the results for Podman Build flags +// that are unique to Podman. +type PodmanBuildResults struct { + SquashAll bool +} + type BuildValues struct { PodmanCommand *buildahcli.BudResults *buildahcli.UserNSResults *buildahcli.FromAndBudResults - *buildahcli.NameSpaceResults *buildahcli.LayerResults + *buildahcli.NameSpaceResults + *PodmanBuildResults } type CpValues struct { -- cgit v1.2.3-54-g00ecf