I'm relatively new to Docker and have a node web server which I have added to a docker image. My image is built using packer, so I don't have a Dockerfile.
My question is when running the docker container on the command line with docker run -it -d <imageId> is there a way to pass in the command to run my web server that resides in the container?
So something like docker run -it -d <imageId> npm start
/usr/local/bin/npmor whatever it is.$ docker run -d -p 80:80 my_image nginx -g 'daemon off;'and still, when I check to see if the container is running, it has exited already.npm startthe command that actually starts the service (and keeps running) or does it start a service using init/upstart/systemd/whatever and then quit?node server.jsEven if I changenpm starttonode server.jsthe same thing still happens.