diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2e252dc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# base image +FROM node:12.2.0-alpine + +# set working directory +WORKDIR /app + +# add `/app/node_modules/.bin` to $PATH +ENV PATH /app/node_modules/.bin:$PATH + +# install and cache app dependencies +COPY package.json /app/package.json +RUN npm install --silent +RUN npm install react-scripts@3.0.1 -g --silent + +# start app +CMD ["npm", "start"] +