-RUN mkdir -p /etc/apt/sources.list.d && \
- echo deb https://apt.dockerproject.org/repo debian-stretch main > /etc/apt/sources.list.d/docker.list && \
- apt-get update && \
- apt-get -yq --no-install-recommends install docker-engine=17.05.0~ce-0~debian-stretch && \
+ARG arvados_version
+RUN echo arvados_version is git commit $arvados_version
+
+RUN cd /usr/src && \
+ git clone --no-checkout https://git.arvados.org/arvados.git && \
+ git -C arvados checkout ${arvados_version} && \
+ cd /usr/src/arvados && \
+ go mod download && \
+ cd cmd/arvados-server && \
+ go install
+
+###########################################################################################################
+FROM ${BUILDTYPE} as base
+
+###########################################################################################################
+FROM debian:10
+ENV DEBIAN_FRONTEND noninteractive
+
+# The arvbox-specific dependencies are
+# gnupg2 runit python3-pip python3-setuptools python3-yaml shellinabox netcat less
+RUN apt-get update && \
+ apt-get -yq --no-install-recommends -o Acquire::Retries=6 install \
+ gnupg2 runit python3-pip python3-setuptools python3-yaml shellinabox netcat less && \