2018-06-05 15:07:03 +00:00
|
|
|
# base image
|
|
|
|
FROM node:9.6.1
|
|
|
|
|
|
|
|
# set working directory
|
|
|
|
RUN mkdir /usr/src/app
|
2018-06-06 13:52:56 +00:00
|
|
|
RUN chmod -R 755 /var/www/am-i-late/logs
|
|
|
|
USER $USER
|
2018-06-05 15:07:03 +00:00
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
# add `/usr/src/app/node_modules/.bin` to $PATH
|
|
|
|
ENV PATH /usr/src/app/node_modules/.bin:$PATH
|
|
|
|
|
|
|
|
# install and cache app dependencies
|
|
|
|
COPY client/package.json /usr/src/app/package.json
|
2018-06-06 13:52:56 +00:00
|
|
|
#RUN chown -R $USER /usr/src/app
|
2018-06-05 15:07:03 +00:00
|
|
|
RUN npm install --silent
|
|
|
|
#RUN npm install react-scripts@1.1.1 -g --silent
|
|
|
|
|
|
|
|
# start app
|
|
|
|
CMD ["make", "front-run"]
|