docker在windows上的使用

1.下载

查看系统是否可以安装Docker for Microsoft Windows,https://docs.docker.com/docker-for-windows/install/

如果系统符合安装要求,下载

  https://download.docker.com/win/stable/Docker Desktop Installer.exe

  注:

    适用于Windows的Docker需要运行Microsoft Hyper-V

如果系统不符合要求,则可以安装Docker Toolbox,下载

  http://mirrors.aliyun.com/docker-toolbox/windows/docker-toolbox/

  注:

    Dockbox Toolbox使用Oracle Virtual Box

由于当前系统为win7,下载的DockerToolbox-18.03.0-ce.exe

2.安装

双击DockerToolbox-18.03.0-ce.exe进入安装 

 一直下一步,到finish

3.启动

双击 Docker Quickstart Terminal

首次启动会比较慢

如果出现Looks like something went wrong in step ´Looking for vboxmanage.exe´...

产生的原因:

  安装目录有问题导致

解决方法:

  首先看下Docker Quickstart Termimal是从哪里创建的快捷方式,右键->属性

   打开脚本文件start.sh

DOCKER_MACHINE="D:\Program Files\Docker Toolbox\docker-machine.exe"
STEP="Looking for vboxmanage.exe"
VBOXMANAGE="D:\Program Files\Oracle\VirtualBox\VBoxManage.exe"

启动成功后

可以使用ssh工具进行连接

ip:192.168.99.100
port:22
user:docker
password:tcuser

查看版本

docker@default:~$ docker version
Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea838
 Built:             Wed Nov 13 07:22:05 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea838
  Built:            Wed Nov 13 07:28:45 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

 

posted @ 2020-04-07 13:17  慕尘  阅读(1505)  评论(0编辑  收藏  举报