FitTrackee/mpwo_client/Dockerfile

26 lines
509 B
Docker
Raw Normal View History

2018-01-07 22:10:25 +01:00
FROM node:latest
# set working directory
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
# add `/usr/src/app/node_modules/.bin` to $PATH
2018-01-14 12:48:52 +01:00
ENV PATH /usr/src/app/node_modules/.bin:$PATH
2018-01-07 22:10:25 +01:00
# add environment variables
2018-01-14 12:48:52 +01:00
ARG REACT_APP_API_URL
2018-01-07 22:10:25 +01:00
ARG NODE_ENV
ENV NODE_ENV $NODE_ENV
2018-01-14 12:48:52 +01:00
ENV REACT_APP_API_URL $REACT_APP_API_URL
2018-01-07 22:10:25 +01:00
# install and cache app dependencies
ADD package.json /usr/src/app/package.json
2018-01-14 12:48:52 +01:00
RUN yarn install --silent
RUN yarn global add react-scripts
2018-01-07 22:10:25 +01:00
# add app
ADD . /usr/src/app/
# start app
2018-01-14 12:48:52 +01:00
CMD yarn start