Docker - 在Windows7中安装Docker
安装docker
1 - Virtualization Support
Check whether virtualization support is enabled at BIOS via HAV detection tool
2 - Docker Toolbox
DockerToolbox-1.12.6
Included Components:
docker 1.12.6
docker-machine 0.8.2
docker-compose 1.9.0
Kitematic 0.12.0
Boot2Docker ISO 1.12.6
VirtualBox 5.1.10
3 - Run Docker Quickstart Terminal
Download Boot2Docker.iso manually from internet and store iso file at:C:\Users\<user>\.docker\machine\cache
Run "Docker Quickstart Terminal".
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com
Start interactive shell
guowli@5CG450158J MINGW64 ~
$ docker version
Client:
Version: 1.12.6
API version: 1.24
Go version: go1.6.4
Git commit: 78d1802
Built: Wed Jan 11 00:23:16 2017
OS/Arch: windows/amd64
Server:
Version: 1.13.1
API version: 1.26
Go version: go1.7.5
Git commit: 092cba3
Built: Wed Feb 8 08:47:51 2017
OS/Arch: linux/amd64
guowli@5CG450158J MINGW64 ~
$
guowli@5CG450158J MINGW64 ~
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default * virtualbox Running tcp://192.168.99.100:2376 v1.13.1
guowli@5CG450158J MINGW64 ~
$
docker-machine常用命令
docker-machine help # 查看帮助信息
active # Print which machine is active
config # Print the connection config for machine
create # Create a machine
env # Display the commands to set up the environment for the Docker client
inspect # Inspect information about a machine
ip # Get the IP address of a machine
kill # Kill a machine
ls # List machines
provision # Re-provision existing machines
regenerate-certs # Regenerate TLS Certificates for a machine
restart # Restart a machine
rm # Remove a machine
ssh # Log into or run a command on a machine with SSH.
scp # Copy files between machines
start # Start a machine
status # Get the status of a machine
stop # Stop a machine
upgrade # Upgrade a machine to the latest version of Docker
url # Get the URL of a machine
version # Show the Docker Machine version or a machine docker version
help # Shows a list of commands or help for one command
Run 'docker-machine COMMAND --help' for more information on a command.
通过SSH方式登录boot2docker
一般情况下,boot2docker的默认地址为192.168.99.100,SSH端口:22,默认的用户名和密码:docker/tcuser。
具体信息可通过Docker Quickstart Terminal执行相关命令查看和ssh登录。
但Docker Quickstart Terminal的复制粘贴较为繁琐,建议使用第三方ssh登录工具。
guowli@5CG450158J MINGW64 ~
$ docker-machine ip
192.168.99.100
guowli@5CG450158J MINGW64 ~
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default * virtualbox Running tcp://192.168.99.100:2376 v1.13.1
guowli@5CG450158J MINGW64 ~
$ docker-machine ssh default
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
_ _ ____ _ _
| |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __
| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ |
|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
Boot2Docker version 1.13.1, build HEAD : b7f6033 - Wed Feb 8 20:31:48 UTC 2017
Docker version 1.13.1, build 092cba3
docker@default:~$
在boot2docker中切换root用户
可以通过sudo -i方式切换成root用户
参考信息:http://stackoverflow.com/questions/32646952/docker-machine-boot2docker-root-password
$ docker-machine ssh default
docker@default:~$ sudo -i
Boot2Docker version 1.13.1, build HEAD : b7f6033 - Wed Feb 8 20:31:48 UTC 2017
Docker version 1.13.1, build 092cba3
root@default:
在boot2docker中设置代理
因网络访问限制导致无法拉取镜像:
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.
处理方法:在boot2docker的/var/lib/boot2docker/profile文件添加相应代理,然后重启docker。
例如:
$ docker-machine ssh default
docker@default:~$ sudo -i
Boot2Docker version 1.13.1, build HEAD : b7f6033 - Wed Feb 8 20:31:48 UTC 2017
Docker version 1.13.1, build 092cba3
root@default:~# vi /var/lib/boot2docker/profile
root@default:~# cat /var/lib/boot2docker/profile | tail -n 3
export HTTP_PROXY=http://10.144.1.10:8080
export HTTPS_PROXY=https://10.144.1.10:8080
export NO_PROXY=localhost,127.0.0.1,.nsn-net.net,.ext.net.nokia.com,.inside.nsn.com,.int.net.nokia.com,.inside.nokiasiemensnetworks.com
root@default:~#
root@default:~# exit
docker@default:~$ exit
Docker - 在Windows7中安装Docker的更多相关文章
- Docker(一) - CentOS7中安装Docker - (视频教程)
Docker的使用越来越多,安装也相对简单.本文使用视频的方式展示在CentOS7系统中安装Docker,本文更适合于准备入门学习Docker的童靴. 以下视频,请带上耳机开始聆听 (双击全屏播放) ...
- Docker - 在CentOS7中安装Docker
在CentOS 7中安装Docker 1-确认系统信息 # cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) # uname - ...
- Docker - 在CentOS 7中安装Docker
1-确认系统信息 # cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) # uname -a Linux CentOS-7 3. ...
- ubuntu中安装Docker
系统要求: 必须时64位的系统,内核最低要求是3.10 查看系统内核: $ uname -r 3.11.0-15-generic 获取最新版本打Docker: $ wget -qO- https:// ...
- 在deepin中安装docker
用往常方法安装 一般在Linux中安装docker的时候都会使用这条命令 wget -qO- https://get.docker.com/ | sh 而在deepin这么做缺不行 打开网址即可发现支 ...
- 在Ubuntu中安装Docker和docker的使用
1.在Ubuntu中安装Docker 更新ubuntu的apt源索引 sudo apt-get update 安装包允许apt通过HTTPS使用仓库 sudo apt-get install \ ap ...
- Docker 01 - CentOS 7 中安装 Docker 的详细步骤
目录 1 初识 Docker 1.1 Docker 原理简介 1.2 Docker 核心概念 2 安装 Docker 2.1 查看系统内核版本 2.2 更新 yum 包 2.3 安装软件包 2.4 向 ...
- mac下idea中安装docker插件
idea中安装docker插件: 点击Intellij IDEA->Preferences...->Plugins->Browse repositories...如下: 点击Inst ...
- Arch系Linux中安装Docker
Arch系Linux中安装Docker 1. 下载最新版docker $ sudo pacman -Syu docker 2. 免sudo执行docker $ sudo gpasswd -a ${US ...
随机推荐
- Javascript:面试经典套路-查重(reduce)
今天在偶然间查看到了一段代码,代码使用了很短的篇幅完成了字符串统计相同字符次数这个经典面试题,其中用到了reduce这个方法,网上查了查,没有查到什么有价值的东西,导致浪费了我一些时间才看懂,现将我的 ...
- WIMP环境搭建
h1 { color: #3366ff } p { font-size: 16px } body { background-color: rgb(200,200,169) } 环境说明 系统:wind ...
- 读书笔记 effective c++ Item 41 理解隐式接口和编译期多态
1. 显示接口和运行时多态 面向对象编程的世界围绕着显式接口和运行时多态.举个例子,考虑下面的类(无意义的类), class Widget { public: Widget(); virtual ~W ...
- 重写NSArray与NSDictionary的descriptionWithLocale方法
重写NSArray的descriptionWithLocale方法: NSArray+log.h #import <Foundation/Foundation.h> @interface ...
- 用 config drive 配置网络 - 每天5分钟玩转 OpenStack(173)
上一节最后问了大家一个问题:如果 subnet 没有开 DHCP,会是怎样一个情况? 在其他条件不变的情况下,cloud-init 依然会完成那 3 个步骤,也就是说网卡还是会被配置成 dhcp 模式 ...
- Oracle 一些基本命令
--创建表空间 --DATAFILE: 表空间数据文件存放路径 --SIZE: 起初设置为200M --空间名称MOF_TEMP与数据文件名称不要求相同,可随意命名. --AUTOEXTEND ON/ ...
- css常用技巧集合
1 不想让按钮touch时有蓝色的边框或半透明灰色遮罩(根据系统而定) /*解决方式一*/ -webkit-tap-highlight-color:rgba(0,0,0,0); -webkit-use ...
- folly教程系列之:future/promise
attension:本文严禁转载. 一.前言 promise/future是一个非常重要的异步编程模型,它可以让我们摆脱传统的回调陷阱,从而使用更加优雅.清晰的方式进行异步编程.c++11中 ...
- 1020. Tree Traversals
Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and i ...
- 概念学习 - JNDI, JDBC, ODBC, DataSource
layout: post title: 概念学习 - JNDI, JDBC, ODBC, DataSource --- 最近在学习Java Hibernate,对数据库资源访问这块好多概念模糊,所以在 ...