Complete the Dockerfile line to specify the base image for the build stage.
FROM [1] AS builderThe node:18-alpine image is a lightweight Node.js base image commonly used for building Node.js apps.
Complete the command to copy package.json and package-lock.json into the builder stage.
COPY [1] ./Using package*.json copies both package.json and package-lock.json files needed for installing dependencies.
Fix the error in the RUN command to install dependencies in the builder stage.
RUN npm [1]npm start which runs the app instead of installing.npm build which is not a valid npm command.The npm install command installs all dependencies listed in package.json.
Fill both blanks to copy built files from the builder stage to the final image.
COPY --from=[1] [2] ./app/
The --from=builder copies files from the builder stage, and /dist is the typical output folder for built files.
Fill all three blanks to define the final image base, set working directory, and expose port.
FROM [1] WORKDIR [2] EXPOSE [3]
The final image uses node:18-alpine as base, sets /app as working directory, and exposes port 3000 for the app.