mirror of
				https://scm.univ-tours.fr/22107988t/rappaurio-sae501_502.git
				synced 2025-11-04 02:15:22 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			497 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			497 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
# pull the Node.js Docker image
 | 
						|
FROM node:alpine
 | 
						|
 | 
						|
# create the directory inside the container
 | 
						|
WORKDIR /usr/src/app
 | 
						|
 | 
						|
# copy the package.json files from local machine to the workdir in container
 | 
						|
COPY package*.json ./
 | 
						|
 | 
						|
# run npm install in our local machine
 | 
						|
RUN npm install
 | 
						|
 | 
						|
# copy the generated modules and all other files to the container
 | 
						|
COPY . .
 | 
						|
 | 
						|
# our app is running on port 5000 within the container, so need to expose it
 | 
						|
EXPOSE 5000
 | 
						|
 | 
						|
# the command that starts our app
 | 
						|
CMD ["node", "index.js"]
 |