anchor.diff:  # -----------------------------------------------------------------------------
   
   # Install compiler toolchain and libraries.
  -RUN apk add build-base libffi-dev libressl-dev
  +RUN apk add --no-cache build-base libffi-dev libressl-dev
   
   # Install/upgrade pip and virtualenv
   RUN pip install --upgrade pip virtualenv
   
  +# Paths
  +ENV IMS_SOURCE_DIR="/src/ims"
  +ENV IMS_INSTALL_DIR="/opt/ims"
  +
   # Copy the source code over
  -WORKDIR /src/ims
  +WORKDIR "${IMS_SOURCE_DIR}"
   
   COPY ./COPYRIGHT.rst  ./
   COPY ./LICENSE.txt    ./
  
positive.code: 
  # Install the application
  WORKDIR /tmp
  RUN install -o daemon -g daemon -d /opt/ims
  USER daemon:daemon
  RUN virtualenv /opt/ims
  RUN /opt/ims/bin/pip --no-cache-dir install /src/ims
  
  
  # -----------------------------------------------------------------------------
  
negative.code: # -----------------------------------------------------------------------------
  FROM python:3.6-alpine3.7 as application
  
  # Copy build result
  ENV IMS_INSTALL_DIR="/opt/ims"
  COPY --from=build "${IMS_INSTALL_DIR}" "${IMS_INSTALL_DIR}"
  
  # Allow ims_server to bind to privileged port numbers
  RUN apk add --no-cache libcap
  RUN setcap "cap_net_bind_service=+ep" "${IMS_INSTALL_DIR}/bin/python"
  
  # Configuration
  ENV IMS_CONFIG_ROOT="${IMS_INSTALL_DIR}/conf"
  ENV IMS_SERVER_ROOT="/srv/ims"
  ENV IMS_DATA_STORE="MySQL"
  
  RUN install -o daemon -g daemon -d "${IMS_SERVER_ROOT}"
  WORKDIR "${IMS_SERVER_ROOT}"
  USER daemon:daemon
  
  EXPOSE 80
  
  CMD [ "/opt/ims/bin/ims_server", "--log-file", "-" ]
  