博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
docker学习2-安装实践
阅读量:6848 次
发布时间:2019-06-26

本文共 2661 字,大约阅读时间需要 8 分钟。

windows上安装docker后,默认自动在后台运行,右下角有docker图标,鼠标右键点击出现菜单Docker for Windows popup menu

可以查看docker版本,对一些基本项进行设置如下:

安装及具体操作参见官方文档:

与docker toolbox版本带有docker 命令行终端快捷方式及图形化操作界面不同,新版docker安装后可以直接通过cmd命令行窗口运行,进入dos窗口后运行docker命令如docker info,显示内容如下:

C:\Users\dl>docker infoContainers: 0 Running: 0 Paused: 0 Stopped: 0Images: 0Server Version: 1.12.1Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 0537c534356b6: Retrying in 1 secondLogging Driver: json-fileCgroup Driver: cgroupfsPlugins: Volume: localSwarm: inactiveRuntimes: runcDefault Runtime: runcSecurity Options: seccompKernel Version: 4.4.20-mobyOperating System: Alpine Linux v3.4OSType: linuxArchitecture: x86_64CPUs: 2Total Memory: 1.942 GiBName: mobyID: MIZR:NLVI:C337:SKVU:WI56:AWQ6:4BD2:YBWH:Z6AH:Y53R:ODFV:LW5XDocker Root Dir: /var/lib/dockerDebug Mode (client): falseDebug Mode (server): true File Descriptors: 13 Goroutines: 22 System Time: 2016-10-10T15:36:16.2037857Z EventsListeners: 0Registry: https://index.docker.io/v1/Insecure Registries: 127.0.0.0/8

如果想用图形化界面操作,可点击“Open Kitematic…”下载并安装图形化操作界面。

然后运行命令 docker run hello-world,显示内容如下:

C:\Users\dl>docker run hello-worldUnable to find image 'hello-world:latest' locallylatest: Pulling from library/hello-worldc04b14da8d14: Pulling fs layerdocker: error pulling image configuration: Get https://dseasb33srnrn.cloudfront.net/registry-v2/docker/registry/v2/blobs/sha256/c5/c54a2cc56cbb2f04003c1cd4507e118af7c0d340fe7e2720f70976c4b75237dc/data?Expires=1476115048&Signature=J~8WollJzHdnCyYhzMAlbCOKVRUBiOCtiDAMCqQ3DLkeQhbMcplb3jEiT9SSarKnCF1xeQbm3YIF9CS2ulKfSycssaIuig3tkSfvX4s~vVhysIMbNF~-wYoUqpvpzRwxfvj8ekg2-eO7K96Xt7b7pjGNgRBKPCBiNIelsX7AP3s_&Key-Pair-Id=APKAJECH5M7VWIS5YZ6Q: net/http: TLS handshake timeout.See 'docker run --help'.

估计因为国内网络原因,无法从仓库中下载镜像。重试多次下载成功后运行正常,如下:

C:\Users\dl>docker run hello-worldHello 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 bashShare images, automate workflows, and more with a free Docker Hub account: https://hub.docker.comFor more examples and ideas, visit: https://docs.docker.com/engine/userguide/ 找了几个国内可用的镜像中心,到里面搜索找到要下载的镜像,然后复制右边的拉取命令即可,速度很快。 阿里
 

转载地址:http://qgoul.baihongyu.com/

你可能感兴趣的文章
[物理学与PDEs]第2章习题5 正应力的平均值
查看>>
DIV元素水平和垂直居中
查看>>
ASP.NET MVC 5– 使用Wijmo MVC 5模板1分钟创建应用
查看>>
JVM体系结构之三:方法区之1
查看>>
【ARM】arm系列知识框架
查看>>
剑指OFFER之树的子结构(九度OJ1520)
查看>>
C# 窗体WinForm中动态显示radioButton实例
查看>>
Asp.net MVC 3 防止 Cross-Site Request Forgery (CSRF)原理及扩展 安全 注入
查看>>
iOS开发UI篇—Quartz2D使用(截屏)
查看>>
韩非子中的管理故事 -- 明辨人才
查看>>
springmvc验证数据
查看>>
qmf
查看>>
CRLF line terminators导致shell脚本报错:command not found
查看>>
LeetCode - Combination Sum
查看>>
Mysql 正则获取字段的交集【转】
查看>>
Java NIO2:缓冲区
查看>>
AngularJS 使用$sce控制代码安全检查
查看>>
Linux中ifreq 结构体分析和使用 及其在项目中的简单应用
查看>>
HDFS Federation客户端(viewfs)配置攻略
查看>>
Oracle体系结构之Oracle静态监听配置模板
查看>>