getting-started-app/Dockerfile

17 lines
277 B
Docker
Raw Normal View History

2024-12-08 18:45:54 +05:30
FROM node:18-alpine
2024-12-08 19:44:00 +05:30
# Set the working directory
2024-12-08 18:45:54 +05:30
WORKDIR /app
2024-12-08 19:44:00 +05:30
# Copy application code to the container
2024-12-08 18:45:54 +05:30
COPY . .
2024-12-08 19:44:00 +05:30
# Install dependencies
2024-12-08 18:45:54 +05:30
RUN yarn install --production
2024-12-08 19:44:00 +05:30
# Expose the port the app runs on
EXPOSE 3000
# Command to run the application
2024-12-08 18:45:54 +05:30
CMD ["node", "src/index.js"]