概述
Docker有两个版本:
- 社区版(CE)
- 企业版(EE)
Docker Community Edition(CE)非常适合希望开始使用Docker并尝试使用基于容器的应用程序的个人开发人员和小型团队。
Docker Enterprise Edition(EE)专为企业开发和IT团队而设计,他们在生产中大规模构建,发布和运行业务关键型应用程序。
Windows环境:
下载docker安装包,下载地址 :https://hub.docker.com/editions/community/docker-ce-desktop-windows
Linux环境:
如何测试docker是否安装成功?
安装完成后,你可以通过一下命令检测docker是否安装成功。
docker --version
Docker version 18.09.7, build 2d0083d
查看安装docker的版本
查看更多详细信息可以通过一下命令
#docker info
Containers: 11
Running: 0
Paused: 0
Stopped: 11
Images: 23
Server Version: 18.09.7
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
...
您可以运行一个hello-world镜像来测试您的docker是否正确安装
#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.
(amd64)
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://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
您会看到以上的错误输出,是因为您在本地没有hello-world镜像。
通过docker image ls 来查看您本地安装的docker镜像列表
#docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 5152621ce494 11 days ago 131MB
friendlyhello latest 6d2fbf72df16 11 days ago 131MB
***/**** part1 6d2fbf72df16 11 days ago 131MB
<none> <none> 85e012f54e30 11 days ago 131MB
<none> <none> 969ae6bada07 11 days ago 131MB
python 2.7-slim ca96bab3e2aa 4 weeks ago 120MB
hello-world latest fce289e99eb9 6 months ago 1.84kB
以上就是docker的安装及测试,下一章将学习制作docker镜像。
转载于:https://my.oschina.net/u/3824982/blog/3071489
最后
以上就是美满汉堡为你收集整理的docker安装的全部内容,希望文章能够帮你解决docker安装所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复