Gentoo Archives: gentoo-commits

From: Alexys Jacob <ultrabug@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/docker-images:master commit in: /
Date: Sun, 23 Feb 2020 19:46:51
Message-Id: 1582487166.dfea888bda7c3325472bb953a4fee7e8fdf04127.ultrabug@gentoo
1 commit: dfea888bda7c3325472bb953a4fee7e8fdf04127
2 Author: Aaron Simmons <paleozogt <AT> gmail <DOT> com>
3 AuthorDate: Tue Feb 11 00:23:15 2020 +0000
4 Commit: Alexys Jacob <ultrabug <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 23 19:46:06 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/docker-images.git/commit/?id=dfea888b
7
8 #75: support for building more gentoo arches
9
10 Closes: https://github.com/gentoo/gentoo-docker-images/pull/76
11 Signed-off-by: Alexys Jacob <ultrabug <AT> gentoo.org>
12
13 .travis.yml | 7 +++++++
14 build.sh | 7 +++++++
15 2 files changed, 14 insertions(+)
16
17 diff --git a/.travis.yml b/.travis.yml
18 index 860b93e..b606fef 100644
19 --- a/.travis.yml
20 +++ b/.travis.yml
21 @@ -13,11 +13,18 @@ env:
22 - TARGET=stage3-amd64-systemd
23 - TARGET=stage3-x86
24 - TARGET=stage3-x86-hardened
25 + - TARGET=stage3-armv7a
26 + - TARGET=stage3-ppc
27 + - TARGET=stage3-ppc64
28 + - TARGET=stage3-ppc64le
29
30 before_install:
31 # Install docker 17.05.0 or later
32 - sudo apt-get update -qq
33 - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
34 + - echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
35 + - sudo apt-get install qemu-user-static binfmt-support
36 + - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
37 script:
38 - VERSION="$(date -u +%Y%m%d)"
39 - sudo ./build.sh
40
41 diff --git a/build.sh b/build.sh
42 index fcc8b12..eb38eac 100755
43 --- a/build.sh
44 +++ b/build.sh
45 @@ -23,6 +23,12 @@ ORG=${ORG:-gentoo}
46 if [[ "${ARCH}" == "x86" ]]; then
47 MICROARCH="i686"
48 BOOTSTRAP="multiarch/alpine:x86-v3.7"
49 +elif [[ "${ARCH}" = ppc* ]]; then
50 + MICROARCH="${ARCH}"
51 + ARCH=ppc
52 +elif [[ "${ARCH}" = arm* ]]; then
53 + MICROARCH="${ARCH}"
54 + ARCH=arm
55 else
56 MICROARCH="${ARCH}"
57 fi
58 @@ -32,5 +38,6 @@ if [[ -n "${SUFFIX}" ]]; then
59 SUFFIX="-${SUFFIX}"
60 fi
61
62 +set -x
63 docker build --build-arg ARCH="${ARCH}" --build-arg MICROARCH="${MICROARCH}" --build-arg BOOTSTRAP="${BOOTSTRAP}" --build-arg SUFFIX="${SUFFIX}" -t "${ORG}/${TARGET}:${VERSION}" -f "${NAME}.Dockerfile" .
64 docker tag "${ORG}/${TARGET}:${VERSION}" "${ORG}/${TARGET}:latest"