最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Docker安装和简单使用入门教程
时间:2022-06-30 16:14:21 编辑:袖梨 来源:一聚教程网
安装
由于我本人使用的linux系统,原生支持docker,相对安装还是比较简单的
1:使用下面的官方脚本安装:
wget-qO- https://get.docker.com/ | sh
2:输入下面的命令验证是否可以查看版本号,可以就是安装成功
sudo docker version
3:建议把当前使用的用户加到Docker用户组,就可以不用很次都sudo了
sudo usermod-aGdocker 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-itubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://cloud.do***cker.com/
For more examples and ideas, visit:
https://docs.dock**e*r.com/engine/userguide/
现在就开始开始自己的docker学习之旅吧!
相关文章
- 2026年Perplexity场景化应用:学术、编程与日常问答边界 06-16
- 2026年Perplexity国内使用限制:账号、地区与网络环境 06-16
- 灰烬圣预第四章全部流程图文攻略 06-16
- 韩国Naver搜索引擎官网入口 - 2026最新直达链接 06-16
- 2026年Grok API接入:密钥、权限与模型配置说明 06-16
- 2026年Grok插件配置:权限、平台与接口说明 06-16