Skip to content

Commit 4520a39

Browse files
committed
docs: import: add example for multiple --change flags
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 763ae3e commit 4520a39

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

docs/reference/commandline/image_import.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,19 @@ and sets the `DEBUG` environment-variable in the resulting image:
8989
$ docker import --change "ENV DEBUG=true" ./rootfs.tgz exampleimagedir
9090
```
9191

92+
The `--change` option can be set multiple times to apply multiple `Dockerfile`
93+
instructions. The example below sets the `LABEL1` and `LABEL2` labels on
94+
the imported image, in addition to the `DEBUG` environment variable from
95+
the previous example:
96+
97+
```console
98+
$ docker import \
99+
--change "ENV DEBUG=true" \
100+
--change "LABEL LABEL1=hello" \
101+
--change "LABEL LABEL2=world" \
102+
./rootfs.tgz exampleimagedir
103+
```
104+
92105
### <a name="message"></a> Import with a commit message (-m, --message)
93106

94107
The `--message` (or `-m`) option allows you to set a custom comment in

0 commit comments

Comments
 (0)