端口转发:docker – > vagrant – > host

我有一个ftp服务的docker机器运行到一个stream浪机器上,stream浪机正在运行到macos主机上。 docker机ftp服务是通过ftp localhost从stream浪机访问,但我怎么能暴露给mac主机? Mac – > Vagrantnetworking是NATS,所以我在Mac主机和Vagrant之间做了21:21的端口转发,但是在主机上,我做了ftp localhost ,并且不起作用。 :'( 我究竟做错了什么?

这是ps aux在stream浪机器中输出的一部分:

root 7841 0.0 0.5 113612 8948 ? Sl 12:35 0:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 1108 -container-ip 172.17.0.1 -container-port 1108 root 7849 0.0 0.6 121808 10176 ? Sl 12:35 0:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 1107 -container-ip 172.17.0.1 -container-port 1107 root 7857 0.0 0.7 154592 11212 ? Sl 12:35 0:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 1106 -container-ip 172.17.0.1 -container-port 1106 root 7869 0.0 0.7 154592 12212 ? Sl 12:35 0:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 1105 -container-ip 172.17.0.1 -container-port 1105 root 7881 0.0 0.6 113612 10172 ? Sl 12:35 0:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 1104 -container-ip 172.17.0.1 -container-port 1104 root 7888 0.0 0.7 162788 11192 ? Sl 12:35 0:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 1103 -container-ip 172.17.0.1 -container-port 1103 root 7901 0.0 0.6 121808 10156 ? Sl 12:35 0:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 1102 -container-ip 172.17.0.1 -container-port 1102 root 7909 0.0 0.6 154592 9216 ? Sl 12:35 0:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 1101 -container-ip 172.17.0.1 -container-port 1101 root 7921 0.0 0.5 121808 9196 ? Sl 12:35 0:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 1100 -container-ip 172.17.0.1 -container-port 1100 root 7929 0.0 0.7 162788 12244 ? Sl 12:35 0:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 21 -container-ip 172.17.0.1 -container-port 21 root 7942 0.0 0.5 121808 8936 ? Sl 12:35 0:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 20 -container-ip 172.17.0.1 -container-port 20 message+ 7961 0.0 0.3 111224 5248 ? Ss 12:35 0:00 proftpd: (accepting connections)