16476: upgrade the arvados/jobs image to Debian Buster.
[arvados.git] / docker / jobs / Dockerfile
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: Apache-2.0
4
5 # Based on Debian Stretch
6 FROM debian:buster-slim
7 MAINTAINER Arvados Package Maintainers <packaging@arvados.org>
8
9 ENV DEBIAN_FRONTEND noninteractive
10
11 RUN apt-get update -q
12 RUN apt-get install -yq --no-install-recommends gnupg
13
14 ARG repo_version
15 RUN echo repo_version $repo_version
16 ADD apt.arvados.org-$repo_version.list /etc/apt/sources.list.d/
17
18 ADD 1078ECD7.key /tmp/
19 RUN cat /tmp/1078ECD7.key | apt-key add -
20
21 ARG python_sdk_version
22 ARG cwl_runner_version
23 RUN echo cwl_runner_version $cwl_runner_version python_sdk_version $python_sdk_version
24
25 RUN apt-get update -q
26 RUN apt-get install -yq --no-install-recommends nodejs \
27     python-arvados-python-client=$python_sdk_version \
28     python3-arvados-cwl-runner=$cwl_runner_version
29
30 # use the Python executable from the python-arvados-cwl-runner package
31 RUN rm -f /usr/bin/python && ln -s /usr/share/python2.7/dist/python-arvados-python-client/bin/python /usr/bin/python
32 RUN rm -f /usr/bin/python3 && ln -s /usr/share/python3/dist/python3-arvados-cwl-runner/bin/python /usr/bin/python3
33
34 # Install dependencies and set up system.
35 RUN /usr/sbin/adduser --disabled-password \
36       --gecos 'Crunch execution user' crunch && \
37     /usr/bin/install --directory --owner=crunch --group=crunch --mode=0700 /keep /tmp/crunch-src /tmp/crunch-job
38
39 USER crunch