anchor.diff: +ARG SETUP_REPO=andreassko
  +ARG IMAGE_TAG=latest
  +
   FROM buildpack-deps:18.04 as build_base
   
   ARG GALAXY_RELEASE=release_19.09
  
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:     && /usr/bin/common_cleanup.sh
  
  # Install remaining dependencies
  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 \
                                                        zlib1g-dev -y \
      && pip install Cython wheel \
      && pip install pysam \
      && /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
  
  COPY ./files/start.sh /usr/bin/start.sh
  
  EXPOSE 80
  