docs: import: add example for multiple --change flags

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2025-05-06 19:38:27 +02:00
parent 763ae3e0fb
commit 4520a390d2
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C

View File

@ -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
```
### <a name="message"></a> Import with a commit message (-m, --message)
The `--message` (or `-m`) option allows you to set a custom comment in