I’m setting up a basic docker container which contains a server.js script inside my-app folder.
My dockerfile looks like this:
#Use node parent image
FROM node:9.6.1
#Set the working directory to /my-app
WORKDIR /my-app
# Make port 80 available to the world outside this container
EXPOSE 80
cmd pwd
RUN npm install
# start app
CMD node server.js
The server.js file is not found and I'm trying to debug this by printing pwd to the terminal. I get the error when server.js file cannot be found, but CMD pwd seems to be ignored. How can I print in the container to find out why server.js cannot be executed?