• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Docker安装和简单使用入门教程

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

安装

由于我本人使用的linux系统,原生支持docker,相对安装还是比较简单的

1:使用下面的官方脚本安装:

wget -qO- https://get.docker.com/ | sh

2:输入下面的命令验证是否可以查看版本号,可以就是安装成功

sudo docker version

3:建议把当前使用的用户加到Docker用户组,就可以不用很次都sudo了

sudo usermod -aG docker your_username

4:重新登录,sudo权限才会成效

logout

至此,你的docker环境就已经很快的安装完了

简单使用

一切从hello world开始,如下命令

docker run hello-world

你大致会看到如下内容

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.
 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://cloud.docker.com/
For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/

现在就开始开始自己的docker学习之旅吧!

以上所述是小编给大家介绍的Docker安装和简单使用入门教程,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对极客世界网站的支持!


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap