flask_react_playground/frontend/Dockerfile
2021-04-20 01:24:25 +02:00

24 lines
495 B
Docker

# Pull latest official node image
FROM node:latest
# Expose ports
EXPOSE 3000
EXPOSE 35729
# Set working directory
WORKDIR /app
# Add /app/node_modules/.bin to environment variables
ENV PATH /app/node_modules/.bin:$PATH
# Copy package files and install app dependencies
COPY package.json /app/package.json
COPY package-lock.json /app/package-lock.json
RUN npm install
RUN npm install react-scripts
# Add React app to working directory
ADD . /app
# Start the React app
CMD ["npm", "start"]