anchor.diff:  FROM buildpack-deps:19.10 as build
   
   ENV EXPORT_DIR=/export \
  -    GALAXY_ROOT=/galaxy
  +    GALAXY_ROOT=/galaxy \
  +    HTCONDOR_ROOT=/opt/htcondor
   
   ENV GALAXY_RELEASE=${GALAXY_RELEASE:-release_19.05} \
       GALAXY_REPO=${GALAXY_REPO:-https://github.com/galaxyproject/galaxy} \
  
positive.code:     && find /usr/lib/ -name '*.pyc' -delete | true \
      && find $GALAXY_CONDA_PREFIX/ -name '*.pyc' -delete | true \
      && find $GALAXY_VIRTUAL_ENV -name '*.pyc' -delete | true \
      && rm -rf /tmp/* /root/.cache/ /var/cache/* $GALAXY_ROOT/client/node_modules/ $GALAXY_VIRTUAL_ENV/src/ /home/galaxy/.cache/ /home/galaxy/.npm
  
  # Install Galaxy dependencies and delete unneeded afterwards
  RUN apt update && apt install python-dev python-pip -y \
      && cd $GALAXY_ROOT && ./scripts/common_startup.sh \
      && . $GALAXY_ROOT/.venv/bin/activate && pip install psycopg2 \
      && pip uninstall cheetah -y \
      && pip install cheetah \
      && deactivate \
      && find $GALAXY_ROOT -name '*.pyc' -delete | true
  
  FROM ubuntu:19.10
  
  COPY --from=build /galaxy /galaxy
  COPY --from=build /tool_deps /tool_deps 
  COPY --from=build /home/galaxy /home/galaxy
  
  #COPY --from=build /opt/htcondor /opt/htcondor
  ENV DEBIAN_FRONTEND noninteractive
  
negative.code: 
  ENV GALAXY_CONFIG_FILE=$GALAXY_CONFIG_DIR/galaxy.yml
  
  COPY --from=build ${GALAXY_ROOT} ${GALAXY_ROOT}
  COPY --from=build ${GALAXY_CONFIG_TOOL_DEPENDENCY_DIR} ${GALAXY_CONFIG_TOOL_DEPENDENCY_DIR}
  COPY --from=build ${GALAXY_HOME} ${GALAXY_HOME}
  
  RUN apt update && apt install --no-install-recommends netcat libpq-dev mercurial libgomp1 -y \
      && groupadd -r $GALAXY_USER -g $GALAXY_GID \
      && useradd -u $GALAXY_UID -r -g $GALAXY_USER -d $GALAXY_HOME -c "Galaxy user" --shell /bin/bash $GALAXY_USER \
      && chown -R $GALAXY_USER:$GALAXY_USER $GALAXY_HOME $GALAXY_ROOT $GALAXY_CONFIG_TOOL_DEPENDENCY_DIR
  