CoolFace
Apppublic

SstudizeSA/B2BDyanamicSOCA

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes
Dockerfile30 linesDownload Raw Back to root
1FROM python:3.122### Set up user with permissions3# Set up a new user named "user" with user ID 10004RUN useradd -m -u 1000 user5 6# Switch to the "user" user7USER user8 9# Set home to the user's home directory10ENV HOME=/home/user \11    PATH=/home/user/.local/bin:$PATH12 13# Set the working directory to the user's home directory14WORKDIR $HOME/app15 16# Copy the current directory contents into the container at $HOME/app setting the owner to the user17COPY --chown=user . $HOME/app18 19### Set up app-specific content20COPY requirements.txt requirements.txt21RUN pip3 install -r requirements.txt22 23COPY . .24 25### Update permissions for the app26USER root27RUN chmod 777 ~/app/*28USER user29 30CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]