File size: 587 Bytes
2684445 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | FROM python:3.9
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# Set the working directory inside the container
WORKDIR /app
# Clone the repo to current directory
RUN git clone https://github.com/nishantprime/Web-Databases.git .
# Install Python dependencies listed in requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copy the rest of the application code from the host to the container
COPY --chown=user . /app
# Specify the command to run the application with Gunicorn
CMD ["gunicorn", "app:app", "-b", "0.0.0.0:7860"] |