Dockerfile 985 B

1234567891011121314151617181920212223242526
  1. # For more information, please refer to https://aka.ms/vscode-docker-python
  2. FROM python:3.11.0a6-slim-buster
  3. # Keeps Python from generating .pyc files in the container
  4. ENV PYTHONDONTWRITEBYTECODE=1
  5. # Turns off buffering for easier container logging
  6. ENV PYTHONUNBUFFERED=1
  7. # Install pip requirements
  8. COPY requirements.txt .
  9. RUN python -m pip install --upgrade pip
  10. RUN python -m pip install -r requirements.txt
  11. RUN python -m pip install flask
  12. RUN python -m pip show flask
  13. WORKDIR /app
  14. COPY . /app
  15. # Creates a non-root user with an explicit UID and adds permission to access the /app folder
  16. # For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
  17. RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
  18. USER appuser
  19. # During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
  20. CMD ["python", "Backend\Sources\run.py"]