centos7.1 安裝 docker
centos7.1 安裝 docker
# 查看centos版本 uname -a yum -y update
# 安裝 docker curl -sSL https://get.docker.com/ | sh yum install -y docker-selinux
# 查看docker版本 docker --version
# 啟動docker服務 systemctl start docker.service
# 測試docker安裝成功 docker run hello-world
# 配置Docker開機自啟動: systemctl enable docker.service
# 已安裝鏡像列表 docker images
# 查找官方倉庫centos鏡像 docker search centos
# pull 官方鏡像,有時網絡問題需要多嘗試幾次 sudo docker pull centos
# 以終端方式運行;先查到id;或都也可以直接使用[REPOSITORY]:[tag]的方式 [root@localhost /]
# docker images REPOSITORY TAG IMAGE ID CREATED SIZE centos latest 8596123a638e 12 days ago 196.7 MB hello-world latest 94df4f0ce8a4 4 weeks ago 967 B sudo docker run -it 8596123a638e /bin/bash
http://xxxxxx/Linuxjc/1134240.html TechArticle