The status page image starts with a shell-form CMD. Switch it to exec form, split it so node is fixed and server.js is the default argument, and use that to run a second script from the same image.
Build it and read the warning at the end of the output:
Open the Dockerfile and replace the last line with these two, then press Save:
dockerfile
ENTRYPOINT ["node"]
CMD ["server.js"]Rebuild and run the server with no arguments, so CMD applies:
sh
docker build -t status-page:0.5 .
docker run -d --name status -p 8080:3000 status-page:0.5
docker psprint-config.js prints the settings the app would use. Arguments after the image name replace CMD only:
Now try a command that is not a Node.js script: