Windows 下安装使用docker swarm machine docker toolbox-阿里云开发者社区

开发者社区> zchd> 正文

Windows 下安装使用docker swarm machine docker toolbox

简介: 下载docker 集成安装环境 http://get.daocloud.io/#install-toolbox 这个网站很不错,下载 这个集成了 docker docker-machine ,还有git 环境   docker-machine 使用的官方网站在 http://docs.
+关注继续查看

下载docker 集成安装环境

http://get.daocloud.io/#install-toolbox 这个网站很不错,下载

这个集成了 docker docker-machine ,还有git 环境

 

docker-machine 使用的官方网站在 http://docs.docker.com/machine/get-started/ 按照官方的一部一部的来

C:\Users\jackluo>sh
sh-3.1$ docker-machine create --driver virtualbox dev #创建机器
Creating VirtualBox VM...
Creating SSH key...
Starting VirtualBox VM...
Starting VM...
To see how to connect Docker to this machine, run: d:\Program Files\Docker Toolbox\docker-machine.exe env dev
sh-3.1$ env "$(docker-machine env dev)"
HOMEPATH=\Users\jackluo
APPDATA=C:\Users\jackluo\AppData\Roaming
PROGRAMW6432=C:\Program Files
TERM=cygwin
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
WINDIR=C:\Windows
COMMONPROGRAMW6432=C:\Program Files\Common Files
PUBLIC=C:\Users\Public
PROGRAMDATA=C:\ProgramData
USERDOMAIN=jackluo-PC
COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files
OS=Windows_NT
ALLUSERSPROFILE=C:\ProgramData
!::=::\
TEMP=/tmp
COMMONPROGRAMFILES=C:\Program Files (x86)\Common Files
USERNAME=jackluo
PROCESSOR_LEVEL=6
PATH=/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/d/Program Files/TortoiseSVN/bin:/d/Program Files/nodejs/:/d/Program Files/TortoiseGit/bin:/cmd:/bin:/d/Go/bin:/d/program files/skype/Phone/:/d/HashiCorp/Vagrant/bin:/c/W
tem32/WindowsPowerShell/v1.0/:.:/d/Program Files/Boot2Docker for Windows:/c/Users/jackluo/AppData/Roaming/npm:/d/golang/bin:/bin:.:/d/Program Files/Docker Toolbox
PSMODULEPATH=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
FP_NO_HOST_CHECK=NO
PWD=/c/Users/jackluo
SYSTEMDRIVE=C:
PROCESSOR_ARCHITEW6432=AMD64
USERPROFILE=C:\Users\jackluo
LOGONSERVER=\\JACKLUO-PC
PROCESSOR_ARCHITECTURE=x86
LOCALAPPDATA=C:\Users\jackluo\AppData\Local
!C:=C:\Users\jackluo
SHLVL=1
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
GOROOT=D:\Go\
HOMEDRIVE=C:
WINDOWS_TRACING_FLAGS=3
WINDOWS_TRACING_LOGFILE=C:\BVTBin\Tests\installpackage\csilogfile.log
VBOX_MSI_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
PROMPT=$P$G
COMSPEC=C:\Windows\system32\cmd.exe
TMP=/tmp
SYSTEMROOT=C:\Windows
PROCESSOR_REVISION=3a09
GOPATH=D:/golang;
PROGRAMFILES=C:\Program Files (x86)
NUMBER_OF_PROCESSORS=4
PROGRAMFILES(X86)=C:\Program Files (x86)
SESSIONNAME=Console
COMPUTERNAME=JACKLUO-PC
_=/bin/env
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.103:2376"
export DOCKER_CERT_PATH="C:\Users\jackluo\.docker\machine\machines\dev"
export DOCKER_MACHINE_NAME="dev"
# Run this command to configure your shell:
# eval "$(d:\Program Files\Docker Toolbox\docker-machine.exe env dev)"
sh-3.1$ docker ps -a #可以执行命令了读取的就是

如果报了

Get http://127.0.0.1:2375/v1.20/containers/json?all=1: dial tcp 127.0.0.1:2375: ConnectEx tcp: No connection could be made because the target machine actively refused it..
* Are you trying to connect to a TLS-enabled daemon without TLS?
* Is your docker daemon up and running? 

这个错,就是机器没有初始化好,先删除了,再慢慢等吧,创建

 

 

 

整个流程基本都是按照 http://docs.docker.com/swarm/install-manual/ 这个操作

sh-3.1$ docker run --rm swarm create
e6b07677f1fff45ebec4198ecbcb35f7
sh-3.1$ docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
sh-3.1$ docker run -d swarm join --addr=192.168.99.101:2376 token://e6b07677f1fff45ebec4198ecbcb35f
7
fd1fc6b456efd4df4e648b34ca301d8329052ff8c67dace2bf7fcf70be1db5c1
sh-3.1$ docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
fd1fc6b456ef        swarm               "/swarm join --addr=1"   4 seconds ago       Up 2 seconds        2375/tcp            lonely_lovelace
sh-3.1$ docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
sh-3.1$ docker run -d swarm join --addr=192.168.99.102:2376 token://4600de8f0e1340f4128ef072224cf7b
5
63b9f7f29dd99bb04d8a83c0d5c7dcae8ed41e3fe19cf5d11a7d7d5655e51b2e
sh-3.1$ docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
63b9f7f29dd9        swarm               "/swarm join --addr=1"   18 seconds ago      Up 16 seconds       2375/tcp            distracted_tesla
sh-3.1$ docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
63b9f7f29dd9        swarm               "/swarm join --addr=1"   4 minutes ago       Up 4 minutes        2375/tcp            distracted_tesla
sh-3.1$ docker -H tcp://0.0.0.0:2375 info
An error occurred trying to connect: Get https://0.0.0.0:2375/v1.20/info: dial tcp 0.0.0.0:2375: ConnectEx tcp: The requested address is not valid in its context.
sh-3.1$ docker -H tcp://0.0.0.0:2376 info
An error occurred trying to connect: Get https://0.0.0.0:2376/v1.20/info: dial tcp 0.0.0.0:2376: ConnectEx tcp: The requested address is not valid in its context.
sh-3.1$ docker -H tcp://192.168.99.101:2376 info
Containers: 2
Images: 8
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 12
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.0.9-boot2docker
Operating System: Boot2Docker 1.8.2 (TCL 6.4); master : aba6192 - Thu Sep 10 20:58:17 UTC 2015
CPUs: 1
Total Memory: 996.2 MiB
Name: swarm-master
ID: LLV3:7ZEK:GBAV:BJXY:ORLX:FRZF:3F5V:2QHP:PQG4:D3BZ:ZMEP:Z6CW
Debug mode (server): true
File Descriptors: 17
Goroutines: 25
System Time: 2015-10-13T04:39:20.353680777Z
EventsListeners: 0
Init SHA1:
Init Path: /usr/local/bin/docker
Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
 provider=virtualbox
sh-3.1$ docker -H tcp://192.168.99.101:2375 info
An error occurred trying to connect: Get https://192.168.99.101:2375/v1.20/info: dial tcp 192.168.99.101:2375: ConnectEx tcp: No connection could be made because the target machine actively refused it.
sh-3.1$ docker -H tcp://192.168.99.101:2376 list
docker: 'list' is not a docker command.
See 'docker --help'.
sh-3.1$ docker -H tcp://192.168.99.101:2375 info
An error occurred trying to connect: Get https://192.168.99.101:2375/v1.20/info: tls: oversized record received with length 20527
sh-3.1$ docker -H tcp://192.168.99.101:2376 info
Containers: 2
Images: 8
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 12
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.0.9-boot2docker
Operating System: Boot2Docker 1.8.2 (TCL 6.4); master : aba6192 - Thu Sep 10 20:58:17 UTC 2015
CPUs: 1
Total Memory: 996.2 MiB
Name: swarm-master
ID: LLV3:7ZEK:GBAV:BJXY:ORLX:FRZF:3F5V:2QHP:PQG4:D3BZ:ZMEP:Z6CW
Debug mode (server): true
File Descriptors: 22
Goroutines: 33
System Time: 2015-10-13T05:30:10.041167884Z
EventsListeners: 0
Init SHA1:
Init Path: /usr/local/bin/docker
Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
 provider=virtualbox
sh-3.1$ docker -H tcp://192.168.99.102:2376 info
Containers: 1
Images: 8
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 10
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.0.9-boot2docker
Operating System: Boot2Docker 1.8.2 (TCL 6.4); master : aba6192 - Thu Sep 10 20:58:17 UTC 2015
CPUs: 1
Total Memory: 996.2 MiB
Name: swarm-agent-00
ID: J3GU:RXI6:TNZ4:CDYG:GP4X:J2F5:TGJE:7ZYB:O5UG:3XR4:4XV5:3WNT
Debug mode (server): true
File Descriptors: 17
Goroutines: 25
System Time: 2015-10-13T05:30:58.47227003Z
EventsListeners: 0
Init SHA1:
Init Path: /usr/local/bin/docker
Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
 provider=virtualbox
sh-3.1$

这个坑太多了,其次,就是太慢,还是等稳定版再试吧

 

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
RabbitMQ01_消息队列概述、使用场景、劣势、架构图与主要概念、Docker快速安装Rabbitmq、角色分类(三)
RabbitMQ01_消息队列概述、使用场景、劣势、架构图与主要概念、Docker快速安装Rabbitmq、角色分类(三)
14 0
RabbitMQ01_消息队列概述、使用场景、劣势、架构图与主要概念、Docker快速安装Rabbitmq、角色分类(二)
RabbitMQ01_消息队列概述、使用场景、劣势、架构图与主要概念、Docker快速安装Rabbitmq、角色分类(二)
14 0
使用容器编排工具docker swarm安装clickhouse多机集群
1.首先需要安装docker最新版,docker 目前自带swarm容器编排工具 2.选中一台机器作为master,执行命令sudo docker  swarm init [options] 3,再需要加入集群的集群上执行此命令   4.
3202 0
RabbitMQ01_消息队列概述、使用场景、劣势、架构图与主要概念、Docker快速安装Rabbitmq、角色分类(四)
RabbitMQ01_消息队列概述、使用场景、劣势、架构图与主要概念、Docker快速安装Rabbitmq、角色分类(四)
12 0
windows下超简单安装Anaconda配置环境,并在pycharm中运行安装TensorFlow
在使用python进行科学计算时,最不可缺少的就是Anaconda库,本文通过Anaconda与pycharm结合,在pycharm中安装TensorFlow,进行深度学习的平台搭建。
2995 0
RabbitMQ01_消息队列概述、使用场景、劣势、架构图与主要概念、Docker快速安装Rabbitmq、角色分类(一)
RabbitMQ01_消息队列概述、使用场景、劣势、架构图与主要概念、Docker快速安装Rabbitmq、角色分类(一)
11 0
+关注
zchd
架构,编程语言相关技术专家
246
文章
0
问答
文章排行榜
最热
最新
相关电子书
更多
《2021云上架构与运维峰会演讲合集》
立即下载
《零基础CSS入门教程》
立即下载
《零基础HTML入门教程》
立即下载