try_catt / Dockerfile
MohamedLotfy's picture
update healthcheck
2a97f95
raw
history blame contribute delete
473 Bytes
FROM python:3.9-bullseye
RUN useradd -m user # Creates user with home directory
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user requirements.txt .
RUN pip install --user -r requirements.txt
COPY --chown=user . .
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
CMD curl --fail http://localhost:7860/test || exit 1
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]