centos8部署docker&docker的常用命令
Docker 支持以下的 64 位 CentOS 版本:
CentOS 7
CentOS 8
安装命令如下:
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
也可以使用国内 daocloud 一键安装命令:
curl -sSL https://get.daocloud.io/docker | sh
启动 Docker
sudo systemctl start docker
docker run hello-world
容器生命周期管理(下面命令的前面均加docker )
run
start/stop/restart
kill
rm
pause/unpause
create
exec
容器操作
ps
inspect
top
attach
events
logs
wait
export
port
容器rootfs命令
commit
cp
diff
镜像仓库
login
pull
push
search
本地镜像管理
images
rmi
tag
build
history
save
load
import
info|version
info
version