From 068beb5832d7434363efcc7ba1d8a2ba5ee74dd6 Mon Sep 17 00:00:00 2001 From: garrettmills Date: Tue, 30 Jul 2024 09:14:22 -0400 Subject: [PATCH] Update README --- README.md | 22 ++++++++++++++++------ docker-isolate.bash => dlt.bash | 0 2 files changed, 16 insertions(+), 6 deletions(-) rename docker-isolate.bash => dlt.bash (100%) diff --git a/README.md b/README.md index dfd01d8..0888146 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,17 @@ -Goal: +# `dlt` - Docker Layer Tool -- Specify a base image name -- Specify a final image name -- Identify the last layer of the base image -- Export the intermediate layers that the final image adds to the base image -- Reimport those as a single layer +Helpers for performing advanced manipulations of Docker image layers. + +## `isolate [from image] [to image] [--output=path] [--as=image name] [--no-base]` + +Given an image `[to image]` that is based on `[from image]`, extract (or... isolate) the files that changed ONLY since the `[from image]` and output it as a `.tar` file. + +Optionally, using the `--as` flag, create a new image based on `[from image]` that has a single additional layer with all the filesystem changes. + +This command may be useful if you want to flatten an image but still make use of upstream caching of your base image layers. If the `--no-base` flag is specified, the resulting image will contain _only_ the changed files, excluding the base image. + +Example: + +```shell +./dlt.bash isolate ubuntu:22.04 user/myapp:latest --output=changes.tar --as user/myapp:flattened +``` diff --git a/docker-isolate.bash b/dlt.bash similarity index 100% rename from docker-isolate.bash rename to dlt.bash