I've successfully created (using ubuntu VB) a docker image
我已成功创建(使用ubuntu VB)docker镜像
What would be the best approach to let others from my local network run that image using ssh? I've been searching for quite some time and couldn't find anything that'd help.
让我的本地网络中的其他人使用ssh运行该图像的最佳方法是什么?我已经找了很长时间,找不到任何有用的东西。
I believe I have to map to a port somehow using the dockerfile and forward that port from my VM to my actual OS, but I don't know exactly how to do it or if it that's how is supposed to be done.
我相信我必须使用dockerfile以某种方式映射到某个端口并将该端口从我的VM转发到我的实际操作系统,但我不确切知道该怎么做或者它是否应该如何完成。
Any tips at all would be great help
任何提示都会有很大的帮助
TL;DR: Created a docker image using an ubuntu VB and I want others from my local network to be able to use it using ssh
TL; DR:使用ubuntu VB创建了一个docker镜像,我想让我本地网络中的其他人能够使用ssh来使用它
1 个解决方案
#1
0
Ok, made it work, here is how I did it:
好的,让它工作,我就是这样做的:
- Run the image
-
Use
docker port [containerID] 80
, to see the port of the running computer使用docker port [containerID] 80,查看正在运行的计算机的端口
-
Port forward that port from VirtualBox settings
从VirtualBox设置端口转发该端口
-
Set inbound / outbound rules for that specific port from windows firewall settings
从Windows防火墙设置为该特定端口设置入站/出站规则
运行图像
#1
0
Ok, made it work, here is how I did it:
好的,让它工作,我就是这样做的:
- Run the image
-
Use
docker port [containerID] 80
, to see the port of the running computer使用docker port [containerID] 80,查看正在运行的计算机的端口
-
Port forward that port from VirtualBox settings
从VirtualBox设置端口转发该端口
-
Set inbound / outbound rules for that specific port from windows firewall settings
从Windows防火墙设置为该特定端口设置入站/出站规则
运行图像