[ARVADOS] updated: 2.1.0-2461-gf07c059fc

Git user git at public.arvados.org
Fri May 13 19:35:17 UTC 2022


Summary of changes:
 lib/install/deps.go | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

       via  f07c059fca954e4d001cbf1cb36c845be9d884dd (commit)
      from  2ca82cf645eb7d9dad60f98e1feca67042c38c47 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit f07c059fca954e4d001cbf1cb36c845be9d884dd
Author: Tom Clegg <tom at curii.com>
Date:   Fri May 13 15:26:35 2022 -0400

    15370: Add docker to development/test dependencies.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/lib/install/deps.go b/lib/install/deps.go
index cdf28e09c..ed7170936 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -199,6 +199,7 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
 		}
 		if dev || test {
 			pkgs = append(pkgs, "squashfs-tools") // for singularity
+			pkgs = append(pkgs, "gnupg")          // for docker install recipe
 		}
 		switch {
 		case osv.Debian && osv.Major >= 11:
@@ -223,6 +224,37 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
 		}
 	}
 
+	if dev || test {
+		if havedockerversion, err := exec.Command("docker", "--version").CombinedOutput(); err == nil {
+			logger.Printf("%s installed, assuming that version is ok", bytes.TrimSuffix(havedockerversion, []byte("\n")))
+		} else if osv.Debian {
+			var codename string
+			switch osv.Major {
+			case 10:
+				codename = "buster"
+			case 11:
+				codename = "bullseye"
+			default:
+				err = fmt.Errorf("don't know how to install docker-ce for debian %d", osv.Major)
+				return 1
+			}
+			err = inst.runBash(`
+rm -f /usr/share/keyrings/docker-archive-keyring.gpg
+curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
+echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian/ `+codename+` stable' | \
+    tee /etc/apt/sources.list.d/docker.list
+apt-get update
+DEBIAN_FRONTEND=noninteractive apt-get --yes --no-install-recommends install docker-ce
+`, stdout, stderr)
+			if err != nil {
+				return 1
+			}
+		} else {
+			err = fmt.Errorf("don't know how to install docker for osversion %v", osv)
+			return 1
+		}
+	}
+
 	os.Mkdir("/var/lib/arvados", 0755)
 	os.Mkdir("/var/lib/arvados/tmp", 0700)
 	if prod || pkg {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list