diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b4709d3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +# pull official base image +FROM node:13.12.0-alpine + +# set working directory +WORKDIR /app + +# add `/app/node_modules/.bin` to $PATH +ENV PATH /app/node_modules/.bin:$PATH + +# install app dependencies +COPY package.json ./ +COPY package-lock.json ./ +RUN npm install --silent +RUN npm install react-scripts@3.4.1 -g --silent + +RUN mkdir node_modules/.cache && chmod -R 777 node_modules/.cache + + +# add app +COPY . ./ +ENV PORT=8080 + +# start app +CMD ["npm", "start"]