# Use the official Node.js image as base FROM node:latest # Set the working directory inside the container WORKDIR /app # Copy the main.js file from the host to the container COPY . . # Install any dependencies required by your main.js file (if any) # For example, if you have a package.json file, you can uncomment the following line COPY package.json . # Install dependencies RUN npm install # Command to run the main.js file CMD ["node", "main.js"]