18238: Arvbox Singularity / Docker updates wip
authorPeter Amstutz <peter.amstutz@curii.com>
Mon, 4 Oct 2021 17:37:42 +0000 (13:37 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Mon, 4 Oct 2021 17:37:42 +0000 (13:37 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

tools/arvbox/lib/arvbox/docker/Dockerfile.base
tools/arvbox/lib/arvbox/docker/createusers.sh
tools/arvbox/lib/arvbox/docker/service/crunch-dispatch-local/run [changed from file to symlink]

index c112972c4303103a6fee1fc920fa309022b340ee..4556652563681cfb0618d854917b640b21f6d425 100644 (file)
@@ -105,7 +105,7 @@ RUN apt-key add --no-tty /tmp/8D81803C0EBFCD88.asc && \
 RUN mkdir -p /etc/apt/sources.list.d && \
     echo deb https://download.docker.com/linux/debian/ buster stable > /etc/apt/sources.list.d/docker.list && \
     apt-get update && \
-    apt-get -yq --no-install-recommends install docker-ce=5:19.03.13~3-0~debian-buster && \
+    apt-get -yq --no-install-recommends install docker-ce=5:20.10.6~3-0~debian-buster && \
     apt-get clean
 
 # Set UTF-8 locale
index 7cf58e201d1e27ca2492d9ace8d9d241d1c4dc41..66a4ff474768da2428e0404e021ce0d1ab6f4d13 100755 (executable)
@@ -42,6 +42,13 @@ if ! grep "^arvbox:" /etc/passwd >/dev/null 2>/dev/null ; then
     mkdir -p /tmp/crunch0 /tmp/crunch1
     chown crunch:crunch -R /tmp/crunch0 /tmp/crunch1
 
+    # singularity needs to be owned by root and suid
+    chown root /var/lib/arvados/bin/singularity \
+         /var/lib/arvados/etc/singularity/singularity.conf \
+         /var/lib/arvados/etc/singularity/capability.json \
+         /var/lib/arvados/etc/singularity/ecl.toml
+    chmod u+s /var/lib/arvados/bin/singularity
+
     echo "arvbox    ALL=(crunch) NOPASSWD: ALL" >> /etc/sudoers
 
     cat <<EOF > /etc/profile.d/paths.sh
deleted file mode 100755 (executable)
index 3ce2220d0e26d5dc70705e8c8cafb1a7303225ae..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-# Copyright (C) The Arvados Authors. All rights reserved.
-#
-# SPDX-License-Identifier: AGPL-3.0
-
-exec 2>&1
-set -ex -o pipefail
-
-# singularity can use suid
-chown root /var/lib/arvados/bin/singularity \
-      /var/lib/arvados/etc/singularity/singularity.conf \
-      /var/lib/arvados/etc/singularity/capability.json \
-      /var/lib/arvados/etc/singularity/ecl.toml
-chmod u+s /var/lib/arvados/bin/singularity
-
-exec /usr/local/lib/arvbox/runsu.sh $0-service $1
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..a388c8b67bf16bbb16601007540e58f1372ebc85
--- /dev/null
@@ -0,0 +1 @@
+/usr/local/lib/arvbox/runsu.sh
\ No newline at end of file