简体   繁体   English

docker-machine osx端口转发

[英]docker-machine osx port forwarding

How does port forwarding work with docker-machine? 端口转发如何与docker-machine一起使用?

I recently installed the docker toolkit and spun up a container. 我最近安装了docker工具箱并启动了一个容器。 However I cannot reach it on my local mac as. 但是我无法在本地Mac上达到它。

Is this Port forwarding in docker-machine? 这是docker-machine中的端口转发吗? using VBoxManage the best way to access the running docker container using my OSX browser? 使用VBoxManage是使用OSX浏览器访问正在运行的Docker容器的最佳方法吗?

要将端口转发从命令行添加到正在运行的boot2docker VM,请使用以下命令:

VBoxManage controlvm boot2docker-vm natpf1 "default,tcp,127.0.0.1,1234,,1234"

After restarting kitematic & the docker-host default VM. 重新启动kitematic和docker-host默认虚拟机后。 The container appeared in kitematic and the bound URL. 容器以kitematic和绑定的URL出现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM