Note that the app is running on 3000 inside the container, so you can't simply change the expose argument without changing the Node process in the container. It's much simpler to do what I did above with the publish flag. You can map that to whatever port you need on the host.
You can use the
-p
flag to map the container ports when running a Docker image....where it's
-p HOST_PORT:CONTAINER_PORT
https://docs.docker.com/engine/reference/commandline/run/#publish-or-expose-port--p---expose
Note that the app is running on 3000 inside the container, so you can't simply change the
expose
argument without changing the Node process in the container. It's much simpler to do what I did above with thepublish
flag. You can map that to whatever port you need on the host.