CoolFace
Apppublic

iloncka/mosal-api

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
0likes
Dockerfile22 linesDownload Raw Back to root
1# Use the official Python 3.9 image2FROM tiangolo/uvicorn-gunicorn-fastapi:python3.93 4# Set up a new user named "user" with user ID 10005RUN useradd -m -u 1000 user6# Switch to the "user" user7USER user8# Set home to the user's home directory9ENV HOME=/home/user \10	PATH=/home/user/.local/bin:$PATH11 12# Set the working directory to the user's home directory13WORKDIR $HOME/app14 15# Copy the current directory contents into the container at $HOME/app setting the owner to the user16COPY --chown=user . $HOME/app17 18# Install requirements.txt19RUN pip install --no-cache-dir --upgrade -r requirements.txt20 21CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]22