getting-started-app/Dockerfile

17 lines
277 B
Docker
Raw Normal View History

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