docker images [OPTIONS] [REPOSITORY[:TAG]]
$ docker rmi [OPTIONS] IMAGE
$ docker search [OPTIONS] TERM --automated=false Only show automated builds --no-trunc=false Don‘t truncate output -s, --stars=0 Only displays with at least x stars
$ docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]] -a, --author="" 通常填写作者以及联系方式 -m,--message Commit message -p, --pause=true Pause container during commit
eg:
$ docker run -it -p 80 --name commit_test ubuntu /bin/bash
安装nginx
# apt-get update # apt-get install nginx
退出
docker commit -a ‘取名‘ -m ‘nginx‘ commit_test 仓库名字/镜像名字
$ docker commit -a ‘Mantishell‘ -m ‘nginx‘ commit_test mantishell/commit_test $ docker images $ docker run -d --name nginx_web -p 80 mantishell/commit_test nginx -g "daemon off;" $ docker ps
原文:https://www.cnblogs.com/mantishell/p/11294975.html