youtuber-blog-frontend/Dockerfile

22 lines
417 B
Docker
Raw Permalink Normal View History

2024-05-29 18:58:13 +00:00
# Use the official Node.js image
FROM node:18-alpine
# Create and set the working directory
WORKDIR /app
# Copy the build folder to the working directory
COPY build ./build
2024-05-29 19:09:21 +00:00
COPY package.json ./build/
2024-05-29 18:58:13 +00:00
# Change directory to the build folder
WORKDIR /app/build
2024-05-29 19:09:21 +00:00
RUN npm install
2024-05-29 18:58:13 +00:00
# Make port 3000 available to the world outside this container, if necessary
2024-05-29 17:24:54 +00:00
EXPOSE 3000
2024-05-29 18:58:13 +00:00
# Run the application
2024-05-29 19:09:21 +00:00
CMD ["node", "index.js"]