From 4520a390d299bc35334b82f64f7ad6fa2c268b3a Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 6 May 2025 19:38:27 +0200 Subject: [PATCH] docs: import: add example for multiple --change flags Signed-off-by: Sebastiaan van Stijn --- docs/reference/commandline/image_import.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/reference/commandline/image_import.md b/docs/reference/commandline/image_import.md index c6a5db450e..b08e85fb68 100644 --- a/docs/reference/commandline/image_import.md +++ b/docs/reference/commandline/image_import.md @@ -89,6 +89,19 @@ and sets the `DEBUG` environment-variable in the resulting image: $ docker import --change "ENV DEBUG=true" ./rootfs.tgz exampleimagedir ``` +The `--change` option can be set multiple times to apply multiple `Dockerfile` +instructions. The example below sets the `LABEL1` and `LABEL2` labels on +the imported image, in addition to the `DEBUG` environment variable from +the previous example: + +```console +$ docker import \ + --change "ENV DEBUG=true" \ + --change "LABEL LABEL1=hello" \ + --change "LABEL LABEL2=world" \ + ./rootfs.tgz exampleimagedir +``` + ### Import with a commit message (-m, --message) The `--message` (or `-m`) option allows you to set a custom comment in