在CentOS、Fedora系统中使用Docker的方法
番茄系统家园 · 2022-04-16 03:14:44
一、从docker官方yum源进行安装
1、添加docker官方源
cat >/etc/yum.repos.d/docker.repo 2、安装和启动免责声明: 凡标注转载/编译字样内容并非本站原创,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如果你觉得本文好,欢迎推荐给朋友阅读;本文链接: https://m.nndssk.com/xtwt/205793ME1JQ8.html。#安装 sudo yum install docker-engine #启动 sudo systemctl enable docker.service #开机启动 systemctl enable docker.service #验证安装 sudo docker run hello-world二、用脚本的方式安装
curl -sSL https://get.docker.com/ | sh三、非特权用户运行 docker 命令
在 CentOS 或 Fedora 上安装完成 Docker 后,为了能以非 root 用户运行 docker,你需要把你自己添加进 docker 用户组,使用如下命令:
sudo usermod -a -G docker $USER登出,然后再登入,以使组改变生效。
这个时候,你应该可以以一个非特权用户运行 docker 命令了。四、使用国内源
1、安装dao
curl -sSL https://get.daocloud.io/daomonit/install.sh | sh -s 6d3f36d42ae3f3d4237943c65c8f3e5446e49a712、使用dao命令
dao pull ubuntu看起来像这样:
➜~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'其他的可以参考之前发布的文章
猜你喜欢
最新应用
热门应用

