# base image
FROM node:10
# set working directory
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
RUN apt update && apt install nano
# create user "node" and give permissions
#COPY package.json /usr/src/app/package.json
COPY . /usr/src/app/
RUN npm install [email protected] -g --silent
#RUN chown -R node:node . && chmod -R 755 .
#USER node
RUN npm install --silent
RUN npm cache clean --force
# start app
# see package.json for npm command
CMD ["npm", "run", "start"]
Content type
Image
Digest
Size
449.8 MB
Last updated
over 6 years ago
docker pull bgloh/react-docker-app