Windows7/8 Docker 安装

1 Docker CLI             # 客户端,用来运行docker引擎创建镜像和容器
2 Docker Machine.          # 可以让你在windows的命令行中运行docker引擎命令
3 Docker Compose.          # 用来运行docker-compose命令
4 Kitematic.             # 这是Docker的GUI版本
5 Docker QuickStart shell.     # 这是一个已经配置好Docker的命令行环境
6 Oracle VM Virtualbox.       # 虚拟机
  • 下载完成之后直接点击安装,安装成功后,桌边会出现三个图标,入下图所示:
  • 点击 Docker QuickStart 图标来启动 Docker Toolbox终端
  • $ 符号可以输入以下命令来执行
 1 $ docker run hello-world
 2  Unable to find image 'hello-world:latest' locally
 3  Pulling repository hello-world
 4  91c95931e552: Download complete
 5  a8219747be10: Download complete
 6  Status: Downloaded newer image for hello-world:latest
 7  Hello from Docker.
 8  This message shows that your installation appears to be working correctly.
 9 
10  To generate this message, Docker took the following steps:
11   1. The Docker Engine CLI client contacted the Docker Engine daemon.
12   2. The Docker Engine daemon pulled the "hello-world" image from the Docker Hub.
13      (Assuming it was not already locally available.)
14   3. The Docker Engine daemon created a new container from that image which runs the
15      executable that produces the output you are currently reading.
16   4. The Docker Engine daemon streamed that output to the Docker Engine CLI client, which sent it
17      to your terminal.
18 
19  To try something more ambitious, you can run an Ubuntu container with:
20   $ docker run -it ubuntu bash
21 
22  For more examples and ideas, visit:
23   https://docs.docker.com/userguide/
  • 启动不了docker quickstart terminal
    • Docker Quickstart Terminal 快捷方式绑定的git的bash.exe位置不对,导致找不到bash.exe:右键,属性,修改快捷方式的连接位置("C:\Program Files\Git\bin\bash.exe" --login -i "C:\Program Files\Docker Toolbox\start.sh")中git的位置为真正的git的bash.exe(git/bin底下)的位置(出现这种原因往往是因为之前安装过git了.安装git时又没有选择默认路径)
    • 找不到boot2docker.iso文件:将 Docker的目录\Docker Toolbox下的boot2docker.iso复制到C:\Users\用户的名字.docker\machine\cache
    • 显示boot2docker文件太老,新的又下载不下来:打开https://github.com/boot2docker/boot2docker/releases地址,下载最新版本,将最新的iso文件复制到C:\Users\用户的名字.docker\machine\cache目录
    • virtual box 启动不了:virtual box太老了卸载,去官网https://www.virtualbox.org/wiki/Downloads下载最新版本,重新安装
posted @ 2020-08-22 21:18  陨落的星尘  阅读(262)  评论(0编辑  收藏  举报