Browse Source

first working version of Dockerfile

Bernadette Elena Hammerle 2 years ago
parent
commit
5db103ba09
2 changed files with 11 additions and 19 deletions
  1. 3 4
      .dockerignore
  2. 8 15
      Dockerfile

+ 3 - 4
.dockerignore

@@ -1,5 +1,4 @@
 node_modules
-build
-.dockerignore
-Dockerfile
-Dockerfile.prod
+.git
+.gitignore
+README.md

+ 8 - 15
Dockerfile

@@ -1,20 +1,13 @@
-# pull official base image
-FROM node:13.12.0-alpine
+FROM node:12.13.0-alpine
 
-# set working directory
-WORKDIR /src
+RUN apk add --no-cache git
 
-# add `/app/node_modules/.bin` to $PATH
-ENV PATH /node_modules/.bin:$PATH
+COPY . /app
 
-# install app dependencies
-COPY package.json ./
-COPY package-lock.json ./
-RUN npm install --silent
-RUN npm install react-scripts@3.4.1 -g --silent
+WORKDIR /app
 
-# add app
-COPY . ./
+RUN rm package-lock.json
 
-# start app
-CMD ["npm", "start"]
+RUN npm install
+
+CMD ["npm", "start"]