# For more information, please refer to https://aka.ms/vscode-docker-python FROM python:3.9-slim # Creates a non-root user with an explicit UID and adds permission to access the /code folder # For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers RUN useradd -m -u 1000 appuser && chown -R appuser /code # Where we'll copy the code WORKDIR /code # Install pip requirements COPY ./requirements.txt /code/requirements.txt RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt USER appuser COPY --chown=appuser ./ /code # During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]