FROM python:3.9 # Create a non-root user RUN useradd -ms /bin/bash myuser WORKDIR /code # Copy required files COPY ./requirements.txt /code/requirements.txt # Install dependencies RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt # Change ownership of the directory RUN chown -R myuser:myuser /code # Switch to the non-root user USER myuser # Extract the contents of the zip file RUN unzip /code/jainbook.zip -d /code/jainbook # Copy remaining application files COPY . . # Set the startup command CMD ["python", "app.py"]