Closed mixxen closed 9 years ago
Figured out the issue.... The container's environment variable PORT
is being set by marathon. The value of PORT
is set to the value of hostPort
.
I suggest renaming the environment variable that marathon sets from PORT
to HOST_PORT
. Many NodeJS/Express projects by convention use the PORT
environment variable to configure which port to listen on.
@tnolet good idea!
yeah this would be huge
I've started a cluster using the digitalocean.mesophere.com web ui and I'm trying to run a simple nodejs express application in a docker via marathon. Marathon is able run the docker container on the slaves, but I cannot access the bridged port. If I run the docker from the command line on the slave, I am able to access the port.
docker ps
on one of the slaves is shown below (05a is run by marathon, c55 is run from command line withdocker run -d -p 31001:3000 mixxen/express
)Below is the JSON sent to /v2/apps
I am able to see
http://serverip:31001
but nothttp://serverip:31000