Problem Statement
What is the purpose of a Dockerfile in Docker?
Explanation
A Dockerfile is a text file containing instructions (FROM, COPY, RUN, CMD etc) which Docker uses to build an image layer by layer. It defines how the image is constructed. This supports reproducible builds and versioning. :contentReference[oaicite:4]{index=4}
Code Solution
SolutionRead Only
FROM node:14 WORKDIR /app COPY . . RUN npm install CMD ["node","index.js"]
