File tree Expand file tree Collapse file tree
docs/reference/commandline Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,6 +79,20 @@ $ docker inspect -f "{{ .Config.Env }}" f5283438590d
7979[HOME=/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin DEBUG=true]
8080```
8181
82+ You can repeat ` --change ` to apply multiple Dockerfile instructions in the same commit. When you use repeated ` ENV `
83+ instructions, each one updates the named variable while leaving the rest of the environment intact.
84+
85+ ``` console
86+ $ docker commit \
87+ --change "ENV DEBUG=true" \
88+ --change "ENV LOG_LEVEL=debug" \
89+ c3f279d17e0a svendowideit/testimage:version3
90+
91+ $ docker inspect -f " {{ .Config.Env }}" svendowideit/testimage:version3
92+
93+ [HOME=/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin DEBUG=true LOG_LEVEL=debug]
94+ ```
95+
8296### Commit a container with new ` CMD ` and ` EXPOSE ` instructions
8397
8498``` console
You can’t perform that action at this time.
0 commit comments