[root@dyw219 newimg]# docker run -it centos/httpd /bin/bash
[root@a7e9f3120658 /]# echo 'mytest' > /var/www/html/index.html [root@a7e9f3120658 /]# cat /var/www/html/index.html mytest
[root@a7e9f3120658 /]# exit exit
-m 提定說明訊息。
[root@dyw219 newimg]# docker commit -m "Created index.html" a7e9f3120658 centos/httpd:index 5bf6f66639205293fe175fd0b866c94fe24f8f06f5838f857083c121a2e9eca8
[root@dyw219 newimg]# docker images centos/httpd REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE centos/httpd index 5bf6f6663920 15 seconds ago 258 MB centos/httpd latest b4650389df73 7 months ago 258 MB