Skip to content

DO-NOT-MERGE: Add squash-all for podman build - #1900

Closed
TomSweeneyRedHat wants to merge 1 commit into
podman-container-tools:masterfrom
TomSweeneyRedHat:dev/tsweeney/podmansquash
Closed

DO-NOT-MERGE: Add squash-all for podman build#1900
TomSweeneyRedHat wants to merge 1 commit into
podman-container-tools:masterfrom
TomSweeneyRedHat:dev/tsweeney/podmansquash

Conversation

@TomSweeneyRedHat

Copy link
Copy Markdown
Contributor

Add a --squash-all flag that will be unique to podman build and will not
be used by Buildah. buildah bud --layers=false is equivalent to docker build --squash (experimental). When a podman build command includes the --squash option, podman will translate that to --layers=false for the buildah bud api code. A docker build call is equivalent to podman build or podman build --layers=true and that's not changing.

When podman build uses the --squash-all command, it will turn on the --squash option for the buildah bud api to have only one layer returned by the buildah bud code. There's not a Docker equivalent for this at the moment.

I'll hopefully be spinning up a Podman PR in the next day or two that will use this new option.

Signed-off-by: TomSweeneyRedHat tsweeney@redhat.com

Add a `--squash-all` flag that will be unique to `podman build` and will not
be used by Buildah.  `buildah bud --layers=false` is equivalent to `docker build --squash`.  When a podman build command includes the `--squash` option, podman will tranlate that to `--layers=false` for the build build api code.  A `docker build` call is equivalent to `podman build` or `podman build --layers=true` and that's not changing.

When podman build uses the `--squash-all` command, it will turn on the --squash option for the buildah bud api to have only one layer returned by the buildah bud code.  There's not a Docker equivalent for this at the moment.

I'll hopefully be spinning up a Podman PR in the next day or two that will use this new option.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
@TomSweeneyRedHat

Copy link
Copy Markdown
Contributor Author

FYI @mheon

@TomSweeneyRedHat

Copy link
Copy Markdown
Contributor Author

fyi @baude

Comment thread pkg/cli/common.go
UTS string
}

// PodmanBuildResults represents the results for Podman Build flags

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we just add this to Podman?
libpod/cmd/build.go?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably. All the other definitions are here, so thought I'd keep them together. I'll try adding it to cmd/build.go.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per @rhatdan's suggestion, I've moved this code into Podman in podman-container-tools/podman#4215. If those changes are merged there, I will close this PR.

@TomSweeneyRedHat TomSweeneyRedHat changed the title Add squash-all for podman build DO-NOT-MERGE: Add squash-all for podman build Oct 8, 2019
@TomSweeneyRedHat

Copy link
Copy Markdown
Contributor Author

Closing as this was addressed via: podman-container-tools/podman#4215

@TomSweeneyRedHat
TomSweeneyRedHat deleted the dev/tsweeney/podmansquash branch October 29, 2019 12:45
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants