# FROM sets the base image for the container to node.js 22
FROM node:22-alpine
# WORKDIR sets the working directory inside the container to /app
WORKDIR /app
# COPY copies the files from host machine into the container. The two dots means the entire folder structure of the frontend is copied
COPY . . 
# RUN sets any shell commands to run at build time, in this case npm install to install node packages
RUN npm install
# EXPOSE which port the container will listen to
EXPOSE 3000
# CMD defines what runs when the container starts in this case node server.js where server.js is the entry point for the application
CMD ["node", "server.js"]






