I'm running an Aurelia app inside of the standard node docker container and it is listening on port 8080. Within the container, I have tested that it's running using curl
; and it responds with the expected HTML. But I cannot reach the app via the mapped port on the host (outside the container).
I'm running the following command to start the container
$ docker run -it --rm -p 8080:8080 -v ${PWD}:/app node bash
Then inside the container, I install the cli and create a new app
# npm install -g aurelia-cli
# au new
After creating a default app, I cd
into the app directory and run the app.
# au run
As I said above, I can verify the app is running using curl http://localhost:8080
. However, on the host, I cannot access the app:
$ curl http://localhost:8888
curl: (52) Empty reply from server
Originally, I thought this was a docker problem. See this question. But it turns out that Aurelia is listening on localhost
rather than 0.0.0.0
.
au run --host 0.0.0.0
fixed the problem without changingwebpack.config.js
. Thanks