| 
									
										
										
										
											2021-06-23 02:22:31 +08:00
										 |  |  | FROM node:lts-alpine
 | 
					
						
							| 
									
										
										
										
											2020-12-24 16:37:38 -09:00
										 |  |  | 
 | 
					
						
							|  |  |  | # # install simple http server for serving static content
 | 
					
						
							|  |  |  | # RUN npm install -g http-server
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # make the 'app' folder the current working directory
 | 
					
						
							|  |  |  | WORKDIR /app
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # copy both 'package.json' and 'package-lock.json' (if available)
 | 
					
						
							|  |  |  | COPY package*.json ./
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # install project dependencies
 | 
					
						
							|  |  |  | RUN npm install
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # copy project files and folders to the current working directory (i.e. 'app' folder)
 | 
					
						
							| 
									
										
										
										
											2021-06-23 02:22:31 +08:00
										 |  |  | # COPY . .
 | 
					
						
							| 
									
										
										
										
											2020-12-24 16:37:38 -09:00
										 |  |  | 
 | 
					
						
							|  |  |  | # build app for production with minification
 | 
					
						
							|  |  |  | # RUN npm run build
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | EXPOSE 8080
 | 
					
						
							|  |  |  | CMD [ "npm", "run", "serve" ]
 |