主頁(yè) > 知識(shí)庫(kù) > 在CentOS、Fedora系統(tǒng)中使用Docker的方法

在CentOS、Fedora系統(tǒng)中使用Docker的方法

熱門標(biāo)簽:北京大興區(qū)地圖標(biāo)注中心 荊門真人語(yǔ)音電話機(jī)器人哪個(gè)好 新鄉(xiāng)智能電話機(jī)器人有用嗎 ai外呼系統(tǒng)定制 AI智能語(yǔ)音外呼系統(tǒng)是什么 淮安人工外呼系統(tǒng) 浙江虛擬外呼系統(tǒng)費(fèi)用 海外文化宮地圖標(biāo)注 北京外呼系統(tǒng)官網(wǎng)

一、從docker官方y(tǒng)um源進(jìn)行安裝

1、添加docker官方源

cat >/etc/yum.repos.d/docker.repo -EOF
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF

2、安裝和啟動(dòng)

#安裝
sudo yum install docker-engine
#啟動(dòng)
sudo systemctl enable docker.service
#開(kāi)機(jī)啟動(dòng)
systemctl enable docker.service
#驗(yàn)證安裝
sudo docker run hello-world

二、用腳本的方式安裝

curl -sSL https://get.docker.com/ | sh

三、非特權(quán)用戶運(yùn)行 docker 命令

在 CentOS 或 Fedora 上安裝完成 Docker 后,為了能以非 root 用戶運(yùn)行 docker,你需要把你自己添加進(jìn) docker 用戶組,使用如下命令:

sudo usermod -a -G docker $USER

登出,然后再登入,以使組改變生效。
這個(gè)時(shí)候,你應(yīng)該可以以一個(gè)非特權(quán)用戶運(yùn)行 docker 命令了。

四、使用國(guó)內(nèi)源

1、安裝dao

curl -sSL https://get.daocloud.io/daomonit/install.sh | sh -s 6d3f36d42ae3f3d4237943c65c8f3e5446e49a71

2、使用dao命令

dao pull ubuntu

看起來(lái)像這樣:

➜  ~  dao pull ubuntu
Dao from DaoCloud
Initializing, Please wait a minute
Using default tag: latest
Pulling repository daocloud.io/daocloud/daocloud-toolset
aa5dc2eecd4a: Download complete
Status: Image is up to date for daocloud.io/daocloud/daocloud-toolset:latest
daocloud.io/daocloud/daocloud-toolset: this image was pulled from a legacy registry.  Important: This registry version will not be supported in future versions of docker.
Inital Success


# ----------------------------------------------------------------------------
# DaoCloud ToolBox for Docker
#
# DaoCloud, Inc. (c) 2015
#
# Fastest way to pull image from Docker Registry
# ----------------------------------------------------------------------------

Pulling repository ubuntu
Pulling ubuntu image metadata
Pulling ubuntu:latest tag metadata
0105f98ced6d: Load layer complete
66395c31eb82: Load layer complete
002fa881df8a: Load layer complete
a005e6b7dd01: Load layer complete
Loading image to docker ...

** Pull ubuntu success. **
You can find it with 'docker images ubuntu'

其他的可以參考腳本之家之前發(fā)布的文章

標(biāo)簽:贛州 阿里 盤錦 亳州 安陽(yáng) 梅州 蚌埠 南通

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《在CentOS、Fedora系統(tǒng)中使用Docker的方法》,本文關(guān)鍵詞  在,CentOS,Fedora,系統(tǒng),中,使用,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《在CentOS、Fedora系統(tǒng)中使用Docker的方法》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于在CentOS、Fedora系統(tǒng)中使用Docker的方法的相關(guān)信息資訊供網(wǎng)民參考!
  • 企业400电话

    智能AI客服机器人
    15000

    在线订购

    合计11份范本:公司章程+合伙协议+出资协议+合作协议+股权转让协议+增资扩股协议+股权激励+股东会决议+董事会决议

    推薦文章