端口正确暴露,但是服务器正在侦听
127.0.0.1容器内部的连接:
http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello Worldn'+new Date);}).listen(1337, '127.0.0.1');您需要像这样运行服务器:
http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello Worldn'+new Date);}).listen(1337, '0.0.0.0');请注意0.0.0.0而不是127.0.0.1。



