https://github.com/goldmann/docker-squash in a slim docker image
1.2K
A simple, light and handy dockerized version of docker-squash.
$ DOCKER_BIN="$(which docker)"
$ docker run \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "${DOCKER_BIN}":"${DOCKER_BIN}" \
meterian/docker-squash -h
usage: cli.py [-h] [-v] [--version] [-d] [-f FROM_LAYER] [-t TAG]
[--tmp-dir TMP_DIR] [--output-path OUTPUT_PATH]
image
Docker layer squashing tool
positional arguments:
image Image to be squashed
optional arguments:
-h, --help show this help message and exit
-v, --verbose Verbose output
--version Show version and exit
-d, --development Does not clean up after failure for easier debugging
-f FROM_LAYER, --from-layer FROM_LAYER
ID of the layer or image ID or image name. If not
specified will squash all layers in the image
-t TAG, --tag TAG Specify the tag to be used for the new image. By
default it'll be set to 'image' argument
--tmp-dir TMP_DIR Temporary directory to be created and used
--output-path OUTPUT_PATH
Path where the image should be stored after squashing.
If not provided, image will be loaded into Docker
daemon
Content type
Image
Digest
Size
46 MB
Last updated
about 5 years ago
docker pull meterian/docker-squash