github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/examples/python/rideshare/django/app/Dockerfile (about)

     1  # pull official base image
     2  FROM python:3.9
     3  
     4  # set work directory
     5  WORKDIR /usr/src/app
     6  
     7  # set environment variables
     8  ENV PYTHONDONTWRITEBYTECODE 1
     9  ENV PYTHONUNBUFFERED 1
    10  
    11  # install psycopg2 dependencies
    12  RUN apt-get update -y
    13  RUN apt-get install -y postgresql postgresql-client netcat gcc python3-dev musl-dev
    14  
    15  
    16  # install dependencies
    17  RUN pip install --upgrade pip
    18  COPY ./requirements.txt .
    19  RUN pip install -r requirements.txt
    20  
    21  # copy entrypoint.sh
    22  COPY ./entrypoint.sh .
    23  RUN sed -i 's/\r$//g' /usr/src/app/entrypoint.sh
    24  RUN chmod +x /usr/src/app/entrypoint.sh
    25  
    26  # copy project
    27  COPY . .
    28  
    29  # run entrypoint.sh
    30  ENTRYPOINT ["/usr/src/app/entrypoint.sh"]