本站教程收集整理的这篇文章主要介绍了centos 7 安装docker,本站教程本站觉得挺不错的,现在分享给大家,也给大家做个参考。
1. 环境准备
查看内核
uname -r? (3.10.0-693.el7.x86_64)
版本在3.10以上才行。
2. docker安装
目前红帽RHel系统下面安装docker可以有两种方式:一种是使用curl获得docker的安装脚美国高防vps本进行安装,还有一种是使用yum包管理器来安装docker。
我们采用第一种方式curl?
2.1 脚本安装
$ curl -sSL https://get.docker.com/ | sh
2.2 启动docker服务
$ sudo service docker start
?2.3 确认docker安装成功
$ docker run Hello-world
Unable to find image ‘Hello-world:latest‘ locally
latest: Pulling from library/Hello-world
1b930d010525: Pull complete
Digest: sha256:2557e3c07ed1e38f26e389462d03ed943586f744621577a99efb77324b0fe535
Status: Downloaded newer image for Hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message,Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the “Hello-world” image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client,which sent it
to your terminal.
To try something more ambitIoUs,you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images,automate workflows,and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas,visit:
https://docs.docker.com/get-started/
?2.4 如果想用非root用户运行docker,添加用户到docker组即可
$ usermod -aG docker your_username
本站总结
以上是本站教程为你收集整理的centos 7 安装docker全部内容,希望文章能够帮你解决centos 7 安装docker所遇到的程序开发问题。
如果觉得本站教程网站内容还不错,欢迎将本站教程推荐给好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。