File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 11# Use a slim version of Python 3.10 as the base image
22FROM python:3.10-slim
33
4- # Environment variables to prevent Python from writing .pyc files
4+ # Set environment variables to prevent Python from writing .pyc files
55# and to ensure output is logged directly
66ENV PYTHONDONTWRITEBYTECODE=1
77ENV PYTHONUNBUFFERED=1
@@ -13,10 +13,13 @@ WORKDIR /app
1313RUN apt-get update && \
1414 apt-get install -y --no-install-recommends \
1515 git \
16- build-essential && \
17- apt-get clean && \
16+ build-essential \
17+ && apt-get clean && \
1818 rm -rf /var/lib/apt/lists/*
1919
20+ # Create a non-root user and switch to that user
21+ RUN useradd -m appuser
22+
2023# Copy requirements file and install Python dependencies
2124COPY requirements.txt .
2225RUN pip install --upgrade pip && \
You can’t perform that action at this time.
0 commit comments