歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> 學習Linux >> centos7.1 安裝 docker

centos7.1 安裝 docker

日期:2017/3/6 9:47:41   编辑:學習Linux

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

Copyright © Linux教程網 All Rights Reserved