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

发布时间:2022-04-25 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了Docker安装和简单使用入门教程脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

安装

由于我本人使用的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安装和简单使用入门教程,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本宝典网站的支持!

脚本宝典总结

以上是脚本宝典为你收集整理的Docker安装和简单使用入门教程全部内容,希望文章能够帮你解决Docker安装和简单使用入门教程所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:入门"