Jelajahi Sumber

Switch from "docker:stable-git" to "tianon/docker-tianon" (matching official builders that use DinD) for test-pr Dockerfile (especially to catch arches that "docker:stable-git" no longer supports like s390x)

Tianon Gravi 6 tahun lalu
induk
melakukan
5ea61be02a
1 mengubah file dengan 16 tambahan dan 9 penghapusan
  1. 16 9
      Dockerfile

+ 16 - 9
Dockerfile

@@ -1,14 +1,21 @@
-FROM docker:stable-git
+FROM tianon/docker-tianon
 
-RUN apk add --no-cache \
-# bash for running scripts
-		bash \
-# go for compiling bashbrew
-		go libc-dev \
+RUN set -eux; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 # ssl for downloading files
-		libressl \
-# coreutils for real "tac" so it isn't busybox-buggy (where it seems to fail if the pipe is closed prematurely, which defeats the whole purpose of the "tac|tac" idiom)
-		coreutils
+		ca-certificates \
+# git for cloning source code
+		git \
+	; \
+# go for compiling bashbrew (backports to get new enough version and to make it work on s390x)
+	suite="$(awk '$1 == "deb" && $4 == "main" && $3 !~ /[\/-]/ { print $3; exit }' /etc/apt/sources.list)"; \
+	echo "deb http://deb.debian.org/debian $suite-backports main" > /etc/apt/sources.list.d/backports.list; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends -t "$suite-backports" \
+		golang-go \
+	; \
+	rm -rf /var/lib/apt/lists/*
 
 ENV GOPATH /go
 ENV PATH $GOPATH/bin:$PATH