25 lines
495 B
Text
25 lines
495 B
Text
|
# 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"]
|