FROM directive specifies an image to start from. Any valid image reference may be used.
WORKDIR directive sets the current working directory inside the container, equivalent to running
cd inside the container. (Note:
RUN cd will not change the current working directory.)
RUN npm install cowsay knock-knock-jokes
RUN executes the given command inside the container.
COPY cowsay-knockknock.js ./
COPY copies the file or directory specified in the first argument from the build context (the
path passed to
docker build path) to the location in the container specified by the second argument.
CMD node cowsay-knockknock.js
There are many other instructions and options; see the Dockerfile reference for a complete list.