J'avais oublié de push...
This commit is contained in:
		
							
								
								
									
										18
									
								
								TP5/Exercice-4.3/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								TP5/Exercice-4.3/Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
FROM python:3.11-alpine
 | 
			
		||||
 | 
			
		||||
WORKDIR /app
 | 
			
		||||
 | 
			
		||||
# Installer les dépendances
 | 
			
		||||
COPY requirements.txt .
 | 
			
		||||
RUN pip install --no-cache-dir -r requirements.txt
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
COPY app.py .
 | 
			
		||||
 | 
			
		||||
# Créer un utilisateur non privilégié
 | 
			
		||||
RUN adduser -D appuser
 | 
			
		||||
USER appuser
 | 
			
		||||
 | 
			
		||||
# Exposer le port sur lequel l'application s'exécute
 | 
			
		||||
EXPOSE 5000
 | 
			
		||||
CMD ["python3", "app.py"]
 | 
			
		||||
		Reference in New Issue
	
	Block a user