Merge branch '21541-arv-mount-keyerror-rebase' refs #21541
[arvados.git] / sdk / dev-jobs.dockerfile
index bd80a0c1af25f74b21a158cdab99c68488af4d0d..f66f670d815d1936d88ee079e842ebadf8094a0f 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
 # Dockerfile for building an arvados/jobs Docker image from local git tree.
 #
 # Intended for use by developers working on arvados-python-client or
@@ -5,32 +9,23 @@
 # version.
 #
 # Use arvados/build/build-dev-docker-jobs-image.sh to build.
-#
-# (This dockerfile file must be located in the arvados/sdk/ directory because
-#  of the docker build root.)
-
-FROM debian:jessie
-MAINTAINER Ward Vandewege <ward@curoverse.com>
-
-ENV DEBIAN_FRONTEND noninteractive
-
-RUN apt-get update -q && apt-get install -qy git python-pip python-virtualenv python-dev libcurl4-gnutls-dev libgnutls28-dev nodejs
 
-RUN pip install -U setuptools
+FROM debian:bullseye-slim
+MAINTAINER Arvados Package Maintainers <packaging@arvados.org>
 
-ARG sdk
-ARG runner
-ARG cwltool
+RUN DEBIAN_FRONTEND=noninteractive apt-get update -q && apt-get install -qy --no-install-recommends \
+    git python3-dev python3-venv libcurl4-gnutls-dev libgnutls28-dev nodejs build-essential
 
-ADD python/dist/$sdk /tmp/
-ADD cwl/cwltool_dist/$cwltool /tmp/
-ADD cwl/dist/$runner /tmp/
+RUN python3 -m venv /opt/arvados-py
+ENV PATH=/opt/arvados-py/bin:/usr/local/bin:/usr/bin:/bin
+RUN python3 -m pip install --no-cache-dir setuptools wheel
 
-RUN cd /tmp/arvados-python-client-* && python setup.py install
-RUN if test -d /tmp/cwltool-* ; then cd /tmp/cwltool-* && python setup.py install ; fi
-RUN cd /tmp/arvados-cwl-runner-* && python setup.py install
+# The build script sets up our build context with all the Python source
+# packages to install.
+COPY . /usr/local/src/
+# Run a-c-r afterward to check for a successful install.
+RUN python3 -m pip install --no-cache-dir /usr/local/src/* && arvados-cwl-runner --version && crunchstat-summary --version
 
-# Install dependencies and set up system.
 RUN /usr/sbin/adduser --disabled-password \
       --gecos 'Crunch execution user' crunch && \
     /usr/bin/install --directory --owner=crunch --group=crunch --mode=0700 /keep /tmp/crunch-src /tmp/crunch-job