ITPub博客

首页 > 云计算 > > Docker for Windows 版

Docker for Windows 版

作者:浪花小雨滴 时间:2020-05-09 11:49:37 0 删除 编辑
幸也不幸。不幸的是 MacBook Air 患上接上电源就黑屏的毛病,只好在 Windows 上进行开发试验;幸运的是随着 Windows 10 及其 Linux 子系统的推出,Windows 在非 Windows 系开发者中的口碑渐渐好转。

之前在 Linux 和 macOS 上跑过 Docker,在 Windows 上还没有试过。和 macOS 上采用系统原生虚拟系统一样,Windows 上的 Docker 依赖的是 Hyper-V。(Docker for Windows 安装包会协助打开 Hyper-V 特性)

安装

Docker for Windows 有两个版本,Stable 稳定版和 Edge 每月更新版。我选的是 Stable 版。

安装和配置在官方文档说的很清楚,不重复:


Docker 镜像加速

Docker 公司在中国的官网镜像合作市阿里云,可以使用阿里云提供的加速服务:

cr.console.aliyun.com/#

体验

安装后,基本上就是 Docker 的完整体验了。Linux 容器是借用 Alpine Linux 来实现的。Windows 容器暂时无需求,不探索。

docker version:
C:\Users\jickn
λ  docker version
Client:
 Version:      17.03.0-ce
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   60ccb22
 Built:        Thu Feb 23 10:40:59 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.03.0-ce
 API version:  1.26 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   3a232c8
 Built:        Tue Feb 28 07:52:04 2017
 OS/Arch:      linux/amd64
 Experimental: true

docker swarm init:
C:\Users\jickn                                                                                     
λ  docker swarm init                                                                               
Swarm initialized: current node (u5s6xsbvcgifcnvk4mk0fs165) is now a manager.                      

To add a worker to this swarm, run the following command:                                          
   
   docker swarm join \                                                                            
   --token SWMTKN-1-69wsq0xs4xkseh37zzxwr2m6zu2t5ibzigt9hkc1ra60rzovdx-6eja234xgxr7oquj7bmrl01f8 \
   192.168.65.2:2377                                                                              

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31537575/viewspace-3154976/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2018-05-16

  • 博文量
    4259
  • 访问量
    39905