anchor.diff:      apt install -y libpq5 libmariadb3 && \
       rm -rf /var/apt/cache
   
  -RUN pip install --no-cache /wheels/*
  +RUN \
  +    pip install --upgrade pip && \
  +    pip install --no-cache /wheels/*
   
  -COPY . /opt/healthchecks/
  +COPY --from=builder /opt/healthchecks/ /opt/healthchecks/
   
   RUN \
       rm -f /opt/healthchecks/hc/local_settings.py && \
  
positive.code: 
  USER hc
  
  CMD [ "uwsgi", "/opt/healthchecks/docker/uwsgi.ini"]
  
negative.code: FROM python:3.10-slim-buster as builder
  
  COPY requirements.txt /tmp
  RUN apt update && apt install -y build-essential libpq-dev libmariadb-dev libffi-dev libssl-dev rustc
  RUN \
      pip install --upgrade pip && \
      pip wheel --wheel-dir /wheels apprise uwsgi mysqlclient -r /tmp/requirements.txt
  
  COPY . /opt/healthchecks/
  RUN rm -rf /opt/healthchecks/.git
  
  FROM python:3.10-slim-buster
  
  RUN useradd --system hc
  ENV PYTHONUNBUFFERED=1
  WORKDIR /opt/healthchecks
  
  COPY --from=builder /wheels /wheels
  
  RUN \
  