flask_react_playground/frontend/Dockerfile

25 lines
495 B
Text
Raw Normal View History

2021-04-19 23:24:25 +00:00
# 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"]