Docker安装和简单使用入门教程
安装
由于我本人使用的linux系统,原生支持docker,相对安装还是比较简单的
1:使用下面的官方脚本安装:
wget-qO-https://get.docker.com/|sh
2:输入下面的命令验证是否可以查看版本号,可以就是安装成功
sudodockerversion
3:建议把当前使用的用户加到Docker用户组,就可以不用很次都sudo了
sudousermod-aGdockeryour_username
4:重新登录,sudo权限才会成效
logout
至此,你的docker环境就已经很快的安装完了
简单使用
一切从helloworld开始,如下命令
dockerrunhello-world
你大致会看到如下内容
HellofromDocker! Thismessageshowsthatyourinstallationappearstobeworkingcorrectly. Togeneratethismessage,Dockertookthefollowingsteps: 1.TheDockerclientcontactedtheDockerdaemon. 2.TheDockerdaemonpulledthe"hello-world"imagefromtheDockerHub. 3.TheDockerdaemoncreatedanewcontainerfromthatimagewhichrunsthe executablethatproducestheoutputyouarecurrentlyreading. 4.TheDockerdaemonstreamedthatoutputtotheDockerclient,whichsentit toyourterminal. Totrysomethingmoreambitious,youcanrunanUbuntucontainerwith: $dockerrun-itubuntubash Shareimages,automateworkflows,andmorewithafreeDockerID: https://cloud.docker.com/ Formoreexamplesandideas,visit: https://docs.docker.com/engine/userguide/
现在就开始开始自己的docker学习之旅吧!
以上所述是小编给大家介绍的Docker安装和简单使用入门教程,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对毛票票网站的支持!
热门推荐
1 训练狗狗憋尿
2 狗狗追踪训练
3 狗狗训练要多少钱
5 深圳狗狗训练
6 训练狗狗唤回
7 狗狗叫怎么训练
8 狗狗训练班
10 狗狗社会化训练
11 狗狗叫回训练
12 广州狗狗训练学校
13 狗狗训练躺下
14 狗狗随行训练
15 训练狗狗巡回
16 狗狗要怎么训练
17 狗狗喂食训练
18 训练狗狗躺下