chat-bot-backend / Dockerfile
abubasith86's picture
Update Dockerfile
ed940fa verified
raw
history blame contribute delete
895 Bytes
# FROM python:3.10-slim
# # Install git & pip as root
# USER root
# RUN apt-get update && apt-get install -y git && \
# pip install --no-cache-dir --upgrade pip
# # Create and switch to a non-root user for the app
# RUN useradd -m -u 1000 user
# USER user
# WORKDIR /home/user/app
# # Clone your repo
# ARG GH_REPO_URL
# ARG GH_BRANCH=main
# RUN git clone --depth 1 --branch main https://github.com/abubasith456/chat-bot-backend.git .
# # Install Python dependencies from the cloned repo
# RUN pip install --no-cache-dir -r requirements.txt
# EXPOSE 7860
# CMD ["python", "main.py"]
FROM python:3.10-slim
USER root
RUN apt-get update && apt-get install -y git && \
pip install --no-cache-dir --upgrade pip
RUN useradd -m -u 1000 user
USER user
COPY --chown=user entrypoint.sh /home/user/
RUN chmod +x /home/user/entrypoint.sh
EXPOSE 7860
CMD ["/home/user/entrypoint.sh"]