jshimko / meteor-launchpad

A base Docker image for Meteor applications.
https://hub.docker.com/r/jshimko/meteor-launchpad/
MIT License
276 stars 152 forks source link

Howto change default port 3000 exposed ? #112

Closed korenlev closed 6 years ago

jshimko commented 6 years ago

You can use the -p flag to map the container ports when running a Docker image.

docker run -p 4000:3000 ...

...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 the publish flag. You can map that to whatever port you need on the host.