Answer the question
In order to leave comments, you need to log in
How does Docker on Windows remap ports?
There is a simple application on the node that runs inside the container
var express = require('express');
var app = express();
app.get('/', function (req, res) {
res.send('***** Hello World!');
});
app.listen(3000, function () {
console.log('****** Example app listening on port 3000! *****');
docker run -p 3000:3000 <id>
Answer the question
In order to leave comments, you need to log in
> docker run -p 3000:3000
> And nothing.... At the request of localhost:30000
Duc run on 3000, and check 30000?
Tell the node to listen on 0.0.0.0 in addition to specifying the port. And then the node you have on 127.0.0.1 by default inside the container listens - that's the port and is not forwarded to the outside.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question