docker安装

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值