Changed order of operations in the Dockerfile
This commit is contained in:
		@@ -6,6 +6,11 @@ ENV PYTHONDONTWRITEBYTECODE=1
 | 
			
		||||
# Turns off buffering for easier container logging
 | 
			
		||||
ENV PYTHONUNBUFFERED=1
 | 
			
		||||
 | 
			
		||||
WORKDIR /app
 | 
			
		||||
 | 
			
		||||
# Creates new user
 | 
			
		||||
RUN adduser -u 1000 --disabled-password --gecos "" appuser && chown -R appuser /app
 | 
			
		||||
 | 
			
		||||
# Install deps
 | 
			
		||||
RUN apt update && apt full-upgrade -y
 | 
			
		||||
RUN apt install curl gcc -y
 | 
			
		||||
@@ -16,11 +21,8 @@ RUN apt install libmariadb3 libmariadb-dev -y
 | 
			
		||||
COPY requirements.txt .
 | 
			
		||||
RUN python -m pip install -r requirements.txt
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
WORKDIR /app
 | 
			
		||||
COPY . /app
 | 
			
		||||
 | 
			
		||||
RUN adduser -u 1000 --disabled-password --gecos "" appuser && chown -R appuser /app
 | 
			
		||||
USER appuser
 | 
			
		||||
 | 
			
		||||
CMD ["python", "main.py"]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user