motaunginc / Dockerfile
MandlaZwane's picture
Update Dockerfile
4fbc552 verified
raw
history blame contribute delete
546 Bytes
# Use the official Python image from the Docker Hub
FROM python:3.9
# Create a new user named 'user'
RUN useradd -m -u 1000 user
# Set the working directory
WORKDIR /app
# Copy the requirements file and install dependencies
COPY --chown=user requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copy the rest of the application code
COPY --chown=user . .
# Set the user to 'user'
USER user
# Set the entrypoint command to run the application
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]