Complete the code to specify the base image in a Dockerfile.
FROM [1]The FROM instruction sets the base image for the Dockerfile. Here, ubuntu:latest is a valid base image.
Complete the Dockerfile command to copy files from the host to the container.
COPY [1] /appThe COPY command copies files from the current directory . on the host to the /app directory in the container.
Fix the error in the Dockerfile command to expose a port.
EXPOSE [1]The EXPOSE command expects a port number as an integer, like 80. Text or extra words cause errors.
Fill both blanks to run a command and set the working directory in a Dockerfile.
WORKDIR [1] RUN [2]
WORKDIR /usr/src/app sets the working directory. RUN npm install runs the install command inside the container.
Fill all three blanks to define environment variables, expose a port, and specify the command to run.
ENV [1]=[2] EXPOSE [3] CMD ["node", "server.js"]
ENV NODE_ENV=production sets an environment variable. EXPOSE 3000 opens port 3000. CMD runs the node server.