1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
5 # Build this with `build/build_docker_image.py`
7 FROM debian:bookworm-slim
9 RUN apt-get update -q \
10 && DEBIAN_FRONTEND=noninteractive apt-get install -qy python3-venv \
11 && python3 -m venv /opt/arvados-py
13 # The build script sets up our build context with all the Python source
14 # packages to install.
15 COPY . /usr/local/src/
17 RUN /opt/arvados-py/bin/pip install -qq --no-cache-dir --no-input \
18 -r /usr/local/src/requirements.txt
21 FROM debian:bookworm-slim
22 MAINTAINER Arvados Package Maintainers <packaging@arvados.org>
24 ARG OLD_PKGNAME=python3-arvados-python-client
26 RUN apt-get update -q \
27 && DEBIAN_FRONTEND=noninteractive apt-get install -qy python3 $APT_PKGLIST
29 # The symlinks provide path compatibility with old package-based images.
30 RUN adduser --disabled-password --gecos 'Crunch execution user' crunch \
31 && install --directory --owner=crunch --group=crunch --mode=0700 \
32 /keep /tmp/crunch-src /tmp/crunch-job \
33 && ln -s /opt/arvados-py "/usr/lib/$OLD_PKGNAME"
36 ENV PATH=/opt/arvados-py/bin:/usr/local/bin:/usr/bin:/bin
38 COPY --from=0 /opt/arvados-py/ /opt/arvados-py/