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 <tsweeney@redhat.com>
This commit is contained in:
TomSweeneyRedHat
2019-10-07 19:55:56 -04:00
parent eb6ca054fc
commit beadd2694b
4 changed files with 55 additions and 2 deletions

View File

@ -405,6 +405,11 @@ If you omit the unit, the system uses bytes. If you omit the size entirely, the
**--squash**
Squash all of the image's new layers into a single new layer; any preexisting layers
are not squashed.
**--squash-all**
Squash all of the new image's layers (including those inherited from a base image) into a single new layer.
**--tag**, **-t**=*imageName*