centos中的docker镜像安装
时间: 2023-11-17 15:57:14 浏览: 45
在 CentOS 中安装 Docker 镜像可以按照以下步骤进行:
1. 安装 Docker CE 软件包和相关依赖包:
```
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io
```
2. 启动 Docker 服务并设置开机自启:
```
sudo systemctl start docker
sudo systemctl enable docker
```
3. 验证 Docker 是否安装成功:
```
sudo docker run hello-world
```
如果一切正常,你应该能够看到 "Hello from Docker!" 的输出。
相关问题
Centos7 docker镜像
Centos7 docker镜像是基于Centos 7操作系统构建的镜像,它在不同的版本中集成了不同的服务和软件。根据引用资料,我们可以总结出以下几种Centos7 docker镜像:
1. 基础版Centos7镜像:这个镜像主要安装了一些常用的服务,如vim、lsof、wget、tree、sshd等。启动后,root用户的默认密码为2020,建议修改为更加复杂的密码。
2. 开发环境版Centos7镜像:在基础版的基础上,集成了MySQL 5.7服务。同样需要注意,默认密码为2020,建议修改为更加复杂的密码。
3. 中文基础版Centos7镜像:在基础版的基础上,集成了JDK、Git、Maven、Nginx、Node.js等服务。同样需要注意,默认密码为2020,建议修改为更加复杂的密码。
以上是关于Centos7 docker镜像的一些信息,您可以根据自己的需求选择适合的镜像进行使用。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [基于 Docker 的几种常用 CentOS7 镜像](https://blog.csdn.net/github_39577257/article/details/107180891)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
centos 的docker镜像推荐
以下是一些常用的 CentOS Docker 镜像:
1. centos:latest - 官方推荐的最新版本 CentOS 镜像。
2. centos:7 - CentOS 7 版本的官方镜像。
3. centos:8 - CentOS 8 版本的官方镜像。
4. centos:7.6.1810 - 特定版本的 CentOS 7 镜像。
5. centos/mysql-57-centos7 - 包含 MySQL 5.7 的 CentOS 7 镜像。
6. centos/mariadb-101-centos7 - 包含 MariaDB 10.1 的 CentOS 7 镜像。
另外,如果你需要使用中国国内的镜像源,可以考虑以下几个镜像:
1. registry.cn-hangzhou.aliyuncs.com/library/centos:latest
2. dockerhub.azk8s.cn/centos:latest
3. hub-mirror.c.163.com/library/centos:latest
以上是一些常用的 CentOS Docker 镜像,你可以根据自己的需求选择合适的镜像。