Skip to content

Squash image layers. #3252

Open
Open
@lingdie

Description

@lingdie

What is the problem you're trying to solve

After committing a container, the commit image will continuously grow larger. Squashing the commit image layers can effectively reduce the size of the commit image.

Describe the solution you'd like

example commands:

# squash last 2 layers.
nerdctl squash docker.io/library/busybox:latest --from-layer 2 --tag docker.io/library/busybox:squash

Additional context

ref: https://github.com/goldmann/docker-squash

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions