 45788a5f1c
			
		
	
	45788a5f1c
	
	
	
		
			
			This patch makes some optimizations in the result service's image; - switch to `node:8.9-alpine`, which a smaller base image - use `https://` for the registry - use `COPY` instead of `ADD`, following best pracice - cleanup npm cache, and combine steps to reduce image size These changes bring down the image size from 248MB to 81.2MB Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
		
			
				
	
	
		
			19 lines
		
	
	
		
			334 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			334 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
| FROM node:8.9-alpine
 | |
| 
 | |
| RUN mkdir -p /app
 | |
| WORKDIR /app
 | |
| 
 | |
| RUN npm install -g nodemon
 | |
| RUN npm config set registry https://registry.npmjs.org
 | |
| COPY package.json /app/package.json
 | |
| RUN npm install \
 | |
|  && npm ls \
 | |
|  && npm cache clean --force \
 | |
|  && mv /app/node_modules /node_modules
 | |
| COPY . /app
 | |
| 
 | |
| ENV PORT 80
 | |
| EXPOSE 80
 | |
| 
 | |
| CMD ["node", "server.js"]
 |