docker下载
https://www.runoob.com/docker/centos-docker-install.html
service docker start 开启docker
service docker stop 关闭docker
service docker restart 重启docker
docker images 查看本地所有镜像

docker inspect ce5ed8337e73 查看镜像、容器详细信息
docker ps -a 查看当前容器

docker stop CONTAINER ID 停止容器

docker rm CONTAINER ID 删除已经停止的容器

docker rmi IMAGE ID 删除镜像

docker pull nginx 拉取nginx镜像

docker save 镜像名 > /home/镜像名.tar.gz 导出镜像
docker load 镜像名 < /home/镜像名.tar.gz 导入镜像
docker pause 容器名 暂停容器
docker unpause 容器名 恢复暂停
docker exec -it e591e16899c6 /bin/bash 进入正在运行的容器内

运行容器
docker run -d -p 8080:8080 -v /root/imglogs:/root/logs --name imgsave appimgsave
拷贝宿主机文件到容器内
docker cp /usr/lib/libwebp-imageio.so imgsave:/usr/lib
docker镜像加速linux系统运行
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://f1361db2.m.daocloud.io
网友评论