anchor.diff:      && /usr/bin/common_cleanup.sh
   
   # Install remaining dependencies
  -RUN apt update && apt install --no-install-recommends ca-certificates gcc gnupg2 libgomp1 liblzma-dev libbz2-dev libpq-dev \
  +RUN apt update && apt install --no-install-recommends gcc gnupg2 libgomp1 liblzma-dev libbz2-dev libpq-dev \
                                                         mercurial make netcat python-dev python-setuptools python-pip \
  -                                                      squashfs-tools zlib1g-dev -y \
  +                                                      zlib1g-dev -y \
       && pip install Cython wheel \
       && pip install pysam \
       && /usr/bin/common_cleanup.sh
   
  -# Install HTCondor
  -ENV DEBIAN_FRONTEND noninteractive
  -RUN apt update && apt install --no-install-recommends htcondor -y \
  -    && rm /etc/condor/condor_config.local \
  -    && find / -name '*.pyc' -delete | true \
  -    && /usr/bin/common_cleanup.sh
  -
  -# Install Slurm client
  -ENV MUNGER_USER=munge \
  -    MUNGE_UID=1200 \
  -    MUNGE_GID=1200
  -RUN groupadd -r $MUNGER_USER -g $MUNGE_GID \
  -    && useradd -u $MUNGE_UID -r -g $MUNGER_USER $MUNGER_USER \
  -    && echo "deb http://ppa.launchpad.net/natefoo/slurm-drmaa/ubuntu bionic main" >> /etc/apt/sources.list \
  -    && echo "deb-src http://ppa.launchpad.net/natefoo/slurm-drmaa/ubuntu bionic main" >> /etc/apt/sources.list \
  -    && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8DE68488997C5C6BA19021136F2CC56412788738 \
  -    && apt update \
  -    && apt install --no-install-recommends slurm-client slurmd slurmctld slurm-drmaa1 -y \
  -    && apt --no-install-recommends install munge libmunge-dev -y \
  -    && ln -s /usr/lib/slurm-drmaa/lib/libdrmaa.so.1 /usr/lib/slurm-drmaa/lib/libdrmaa.so \
  -    && /usr/bin/common_cleanup.sh
  -
  -# Install CVMFS
  -RUN apt update \
  -    && apt install wget lsb-release -y \
  -    && wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb \
  -    && dpkg -i cvmfs-release-latest_all.deb \
  -    && rm -f cvmfs-release-latest_all.deb \
  -    && apt update \
  -    && apt install --no-install-recommends cvmfs -y \
  -    && mkdir /srv/cvmfs \
  -    && /usr/bin/common_cleanup.sh
  -COPY files/cvmfs /etc/cvmfs
  -
  -# Install Docker
  -RUN apt update \
  -    && apt install --no-install-recommends docker.io -y \
  -    && usermod -aG docker $GALAXY_USER \
  -    && /usr/bin/common_cleanup.sh
  +# GALAXY_USER should be able to run docker without root permissions
  +RUN usermod -aG docker $GALAXY_USER
   
   COPY --chown=$GALAXY_USER:$GALAXY_USER --from=build_galaxy ${GALAXY_ROOT} ${GALAXY_ROOT}
   COPY --chown=$GALAXY_USER:$GALAXY_USER --from=build_miniconda ${GALAXY_CONFIG_TOOL_DEPENDENCY_DIR} ${GALAXY_CONFIG_TOOL_DEPENDENCY_DIR}
   COPY --chown=$GALAXY_USER:$GALAXY_USER --from=build_miniconda ${GALAXY_HOME} ${GALAXY_HOME}
   COPY --chown=$GALAXY_USER:$GALAXY_USER --from=build_miniconda /etc/profile.d/conda.sh /etc/profile.d/conda.sh
   
  -# Install Singularity
  -COPY --from=build_singularity /singularity /singularity
  -RUN make -C /singularity/builddir install \
  -    && rm -rf /singularity \
  -    && sed -e '/bind path = \/etc\/localtime/s/^/#/g' -i /usr/local/etc/singularity/singularity.conf \
  -    && /usr/bin/common_cleanup.sh
  -
   COPY ./files/start.sh /usr/bin/start.sh
   
   EXPOSE 80
  
positive.code:               .venv/include/node .venv/bin/node .venv/bin/nodeenv \
      && /usr/bin/common_cleanup.sh
  
  FROM build_base as build_singularity
  COPY ./files/common_cleanup.sh /usr/bin/common_cleanup.sh
  # Install Go (only needed for building singularity)
  ENV GO_VERSION=1.13
  RUN apt update && apt install --no-install-recommends cryptsetup-bin uuid-dev -y \
      && wget https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz \
      && tar -C /usr/local -xzvf go${GO_VERSION}.linux-amd64.tar.gz \
      && rm go${GO_VERSION}.linux-amd64.tar.gz \
      && /usr/bin/common_cleanup.sh
  
  ENV PATH=/usr/local/go/bin:${PATH}
  ENV SINGULARITY_VERSION=3.5.3
  RUN wget https://github.com/sylabs/singularity/releases/download/v${SINGULARITY_VERSION}/singularity-${SINGULARITY_VERSION}.tar.gz \
      && tar -xzf singularity-${SINGULARITY_VERSION}.tar.gz \
      && cd singularity \
      && ./mconfig \
      && make -C builddir \
      && /usr/bin/common_cleanup.sh
  
  # --- Final image ---
  FROM ubuntu:18.04 as final
  
  COPY ./files/common_cleanup.sh /usr/bin/common_cleanup.sh
  COPY ./files/create_galaxy_user.py /usr/local/bin/create_galaxy_user.py
  
negative.code: ARG SETUP_REPO=andreassko
  ARG IMAGE_TAG=latest
  
  FROM buildpack-deps:18.04 as build_base
  
  ARG GALAXY_RELEASE=release_19.09
  