InterroGen / Dockerfile
yasserrmd's picture
Create Dockerfile
8d04ddf verified
raw
history blame contribute delete
483 Bytes
FROM python:3.11
# Create and switch to non-root user
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# Set working directory
WORKDIR /app
# Copy requirements and install
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copy the entire app
COPY --chown=user . /app
# Set the default command to run both populate_db and app
CMD ["sh", "-c", "python populate_db.py && python run.py"]