windows docker测试二 下载container
安装dockertoolbox,提供了一个docker的界面工具 Kitematic 和字符终端: Docker Quickstart Terminal
(这里安装的Kitematic 是Alpha版本,与单独下载的版本不同,单独下载链接:
http://60.176.242.127/Kitematic-Windows.zip?fid=3Nbjo2XARsgnfaJClhXmvrpK3NENasEDAAAAAP516-CAbePLvxemCuwVDDO2trNN&mid=666&threshold=150&tid=9CC75C5E874CE867724A17E948FED7C3&srcid=119&verno=1
)
可以通过dockertoolbox安装时一起安装或者在单独使用docker时下载和安装
为了测试环境是否OK,我下载一个一个Oracle Express 11g R2 on Ubuntu 16.04 LTS的container
下载命令 docker pull wnameless/oracle-xe-11g
也可以在Kitematic 界面中直接选择后下载
下载后该服务会自动启动,如下图:
数据库的访问用户
systme/oracle
sys/oracle
在这里服务的端口可以修改,镜像提供者的例子是用的1521,默认的随机的断开,如果重启服务该端口会变化
在windows主机上用jdbc连接oracle,测试通过
打开Docker Quickstart Terminal 通过SSH登录该环境:这里登录的IP就是在Kitematic 界面中看见的22端口的地址(猜想:就是把容器内的22端口映射到了一个IP和端口)
tan@tan-PC MINGW64 ~ $ ssh root@192.168.99.100 -p 32773 The authenticity of host '[192.168.99.100]:32773 ([192.168.99.100]:32773)' can't be established. ECDSA key fingerprint is SHA256:Uq1kdeELp3oEfFxILxp0Kp65s9mvfZImUFBm0B/YLWw. Are you sure you want to continue connecting (yes/no)? y Please type 'yes' or 'no': yes Warning: Permanently added '[192.168.99.100]:32773' (ECDSA) to the list of known hosts. root@192.168.99.100's password: Welcome to Ubuntu 16.04 LTS (GNU/Linux 4.4.27-boot2docker x86_64) * Documentation: https://help.ubuntu.com/ The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
第一次登录有警告信息,再登录就没有了。PS:打开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 tan@tan-PC MINGW64 ~ $ ssh root@192.168.99.100 -p 32773 root@192.168.99.100's password: Welcome to Ubuntu 16.04 LTS (GNU/Linux 4.4.27-boot2docker x86_64) * Documentation: https://help.ubuntu.com/ Last login: Mon Oct 31 08:47:31 2016 from 192.168.99.1 root@bba0cfccd633:~#
如果想要下载其他的,可以到https://hub.docker.com/ 搜索