Skip to content

Commit

Permalink
Dockerize React App
Browse files Browse the repository at this point in the history
  • Loading branch information
repodevs committed Oct 15, 2017
1 parent 20eb4ba commit de433d7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM node:latest

# set working directory
RUN mkdir /usr/src/app
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
ADD package.json /usr/src/app/package.json
RUN npm install --silent
RUN npm install [email protected] -g --silent

# add app
ADD . /usr/src/app

# start app
CMD ["npm", "start"]

0 comments on commit de433d7

Please sign in to comment.