Merge pull request #101 from thaJeztah/improve-result-dockerfile
Optimize result image
This commit is contained in:
		@@ -1,14 +1,16 @@
 | 
				
			|||||||
FROM node:8.9-slim
 | 
					FROM node:8.9-alpine
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN mkdir -p /app
 | 
				
			||||||
WORKDIR /app
 | 
					WORKDIR /app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN npm install -g nodemon
 | 
					RUN npm install -g nodemon
 | 
				
			||||||
ADD package.json /app/package.json
 | 
					RUN npm config set registry https://registry.npmjs.org
 | 
				
			||||||
RUN npm config set registry http://registry.npmjs.org
 | 
					COPY package.json /app/package.json
 | 
				
			||||||
RUN npm install && npm ls
 | 
					RUN npm install \
 | 
				
			||||||
RUN mv /app/node_modules /node_modules
 | 
					 && npm ls \
 | 
				
			||||||
 | 
					 && npm cache clean --force \
 | 
				
			||||||
ADD . /app
 | 
					 && mv /app/node_modules /node_modules
 | 
				
			||||||
 | 
					COPY . /app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ENV PORT 80
 | 
					ENV PORT 80
 | 
				
			||||||
EXPOSE 80
 | 
					EXPOSE 80
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user