在CentOS、Fedora系统中如何使用Docker
发表于:2025-02-08 作者:千家信息网编辑
千家信息网最后更新 2025年02月08日,小编给大家分享一下在CentOS、Fedora系统中如何使用Docker,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!一、
千家信息网最后更新 2025年02月08日在CentOS、Fedora系统中如何使用Docker
小编给大家分享一下在CentOS、Fedora系统中如何使用Docker,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!
一、从docker官方yum源进行安装
1、添加docker官方源
cat >/etc/yum.repos.d/docker.repo <<-EOF[dockerrepo]name=Docker Repositorybaseurl=https://yum.dockerproject.org/repo/main/centos/7enabled=1gpgcheck=1gpgkey=https://yum.dockerproject.org/gpgEOF
2、安装和启动
#安装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 6d3f36d42ae3f3d4237943c65c8f3e5446e49a71
2、使用dao命令
dao pull ubuntu
看起来像这样:
➜ ~ dao pull ubuntuDao from DaoCloudInitializing, Please wait a minuteUsing default tag: latestPulling repository daocloud.io/daocloud/daocloud-toolsetaa5dc2eecd4a: Download completeStatus: Image is up to date for daocloud.io/daocloud/daocloud-toolset:latestdaocloud.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 ubuntuPulling ubuntu image metadataPulling ubuntu:latest tag metadata0105f98ced6d: Load layer complete66395c31eb82: Load layer complete002fa881df8a: Load layer completea005e6b7dd01: Load layer completeLoading image to docker ...** Pull ubuntu success. **You can find it with 'docker images ubuntu'
以上是"在CentOS、Fedora系统中如何使用Docker"这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注行业资讯频道!
命令
用户
篇文章
运行
系统
内容
官方
特权
不怎么
大部分
方式
时候
更多
用户组
知识
脚本
行业
资讯
资讯频道
频道
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
数据库防止计算错误
电力网络安全检查工作总结
电子技术和网络技术区别
网络技术网络三要素
苹果平板一直显示未连接服务器
数据库技术会被大数据取代吗
全球化与软件开发
平果手机6s数据库线正品
远程阿里云服务器登陆
安装mysql未显示连接服务器
黄岛区软件开发解决方案
ibm 服务器 温度
网易服务器开局管理
2042服务器怎么样
中国陨石数据库0
武汉纺织大学计算机网络技术
数据库怎么实现安全性
数据库e-r图图形
windows服务器改群晖
服务器文件是啥意思
操作关系型数据库的通用语言
上海专业软件开发收费报价表
我们应该怎么样维护网络安全
数据库查询出生年月日
网络安全已经成为非常重要的
smtp服务器 下载
数据库服务器维护工具
阿里云中转服务器配置
设备网络安全使用方法
html自动保存到服务器