Docker安装和简单使用入门教程
程序员文章站
2022-06-08 22:12:00
安装
由于我本人使用的linux系统,原生支持docker,相对安装还是比较简单的
1:使用下面的官方脚本安装:
wget -qo- https://get....
安装
由于我本人使用的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安装和简单使用入门教程,希望对大家有所帮助
上一篇: XenServer内核模块编译过程详解
推荐阅读
-
使用docker -v 和 Publish over SSH插件实现war包自动部署到docker的操作步骤
-
ubuntu中snap包的安装、更新删除与简单使用
-
Hadoop学习(7)-hive的安装和命令行使用和java操作
-
CorePlex的安装、配置和使用图文教程
-
Linux下Docker安装和使用教程
-
简单谈谈Docker镜像的使用方法
-
C#中BitConverter.ToUInt16()和BitConverter.ToString()的简单使用
-
使用numpy和PIL进行简单的图像处理方法
-
php中mysql连接和基本操作代码(快速测试使用,简单方便)
-
Vue和element-ui结合的简单使用