aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Simmons <paleozogt@gmail.com>2020-02-10 16:23:15 -0800
committerAlexys Jacob <ultrabug@gentoo.org>2020-02-23 20:46:06 +0100
commitdfea888bda7c3325472bb953a4fee7e8fdf04127 (patch)
tree78a782693719fbd38252ba691e3504d1e6a0facc
parentupdate README inventory to add systemd support (diff)
downloaddocker-images-dfea888bda7c3325472bb953a4fee7e8fdf04127.tar.gz
docker-images-dfea888bda7c3325472bb953a4fee7e8fdf04127.tar.bz2
docker-images-dfea888bda7c3325472bb953a4fee7e8fdf04127.zip
#75: support for building more gentoo arches
Closes: https://github.com/gentoo/gentoo-docker-images/pull/76 Signed-off-by: Alexys Jacob <ultrabug@gentoo.org>
-rw-r--r--.travis.yml7
-rwxr-xr-xbuild.sh7
2 files changed, 14 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index 860b93e..b606fef 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,11 +13,18 @@ env:
- TARGET=stage3-amd64-systemd
- TARGET=stage3-x86
- TARGET=stage3-x86-hardened
+ - TARGET=stage3-armv7a
+ - TARGET=stage3-ppc
+ - TARGET=stage3-ppc64
+ - TARGET=stage3-ppc64le
before_install:
# Install docker 17.05.0 or later
- sudo apt-get update -qq
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
+ - echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
+ - sudo apt-get install qemu-user-static binfmt-support
+ - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
script:
- VERSION="$(date -u +%Y%m%d)"
- sudo ./build.sh
diff --git a/build.sh b/build.sh
index fcc8b12..eb38eac 100755
--- a/build.sh
+++ b/build.sh
@@ -23,6 +23,12 @@ ORG=${ORG:-gentoo}
if [[ "${ARCH}" == "x86" ]]; then
MICROARCH="i686"
BOOTSTRAP="multiarch/alpine:x86-v3.7"
+elif [[ "${ARCH}" = ppc* ]]; then
+ MICROARCH="${ARCH}"
+ ARCH=ppc
+elif [[ "${ARCH}" = arm* ]]; then
+ MICROARCH="${ARCH}"
+ ARCH=arm
else
MICROARCH="${ARCH}"
fi
@@ -32,5 +38,6 @@ if [[ -n "${SUFFIX}" ]]; then
SUFFIX="-${SUFFIX}"
fi
+set -x
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" .
docker tag "${ORG}/${TARGET}:${VERSION}" "${ORG}/${TARGET}:latest"