Docker for Windows 10如何访问主机
我使用Docker for Windows 10进行开发。 在Windows 8上使用Docker Toolbox之前,我习惯于在这种情况下“调整”主机虚拟机MobyLinuxVM
。
当我尝试在hyper-vpipe理器中connect
,出现cannot connect
错误。 当我尝试docker-machine ls
我没有docker机。 我怎么可能访问docker上的Windows 10的底层机器?
我想解决的问题是(也就是为什么我想连接):
-
Ubuntu
apt-get
不适合我(我在代理后面)得到像E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/universe/source/Sources Cannot initiate the connection to 3128:80 (0.0.12.56). - connect (22: Invalid argument)
错误E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/universe/source/Sources Cannot initiate the connection to 3128:80 (0.0.12.56). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/universe/source/Sources Cannot initiate the connection to 3128:80 (0.0.12.56). - connect (22: Invalid argument)
。 另一方面Centosyum
,curl
,…工作。http_proxy
variables被设置。 -
我想closures主机上的
swap
。
在1.2.3.4:1234
设置1.2.3.4:1234
http proxy
1.2.3.4:1234
configuration从1.2.3.4:1234
为http://1.2.3.4:1234/
, 1.2.3.4:1234
解决了apt-get
问题。
更新2通过在主机中修改/etc/init.d/automount
并添加swapoff -a
解决了这个问题。
我能够通过容器与各种privieleges运行访问主机MobyLinuxVM。
首先我像这样运行容器(注意在安装根文件系统时有双斜线 ,单一的slack在PowerShell中不适用于我)
docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v //:/host alpine sh
之后,当在容器我只是chroot
chroot /host
然后我可以访问所有我需要的。 /etc/fstab
或swapoff -a
。
- 如何从w10 pc到networking主机的docker集装箱?
- 在Windows 10上,Docker Mount从守护进程挂载项目错误
- 在Windows 10(启用了Hyper-V)和Linux操作系统上安装docker有什么区别?
- Windows 10 Docker Sitespeed.io错误:“$(pwd)”包含本地卷名称的无效字符
- 启用运行Docker命令错误
- Windows 10 DockernetworkingDNS在重新启动后不起作用
- 运行Docker Windows映像时无法启动Sonatype Nexus3服务
- docker不能使用系统代理
- Windows 10教育上的Windows容器是否不可用?