React dockerfile

docker
root 2018-06-06 17:58:22 +02:00
parent a5e94847b3
commit e6b97b1dbd
1 changed files with 4 additions and 5 deletions

View File

@ -2,9 +2,10 @@
FROM node:9.6.1 FROM node:9.6.1
# set working directory # set working directory
RUN mkdir /usr/src/app RUN mkdir -p /usr/src/app
RUN chmod -R 755 /var/www/am-i-late/logs RUN mkdir -p /var/www/am-i-late/symfony
USER $USER RUN chmod -R 777 /var/www
RUN chmod -R 777 /usr/src/app
WORKDIR /usr/src/app WORKDIR /usr/src/app
# add `/usr/src/app/node_modules/.bin` to $PATH # add `/usr/src/app/node_modules/.bin` to $PATH
@ -12,9 +13,7 @@ ENV PATH /usr/src/app/node_modules/.bin:$PATH
# install and cache app dependencies # install and cache app dependencies
COPY client/package.json /usr/src/app/package.json COPY client/package.json /usr/src/app/package.json
#RUN chown -R $USER /usr/src/app
RUN npm install --silent RUN npm install --silent
#RUN npm install react-scripts@1.1.1 -g --silent
# start app # start app
CMD ["make", "front-run"] CMD ["make", "front-run"]