-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Factor docker/build out of docker/run
Signed-off-by: Ilya Leoshkevich <[email protected]>
- Loading branch information
Showing
2 changed files
with
17 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
set -e -u -x -o pipefail | ||
basedir=$(cd "$(dirname "$0")"/.. && pwd) | ||
ARCH=${ARCH-s390x} | ||
deb_arch=$ARCH | ||
gnu_arch=$ARCH | ||
case "$deb_arch on $(uname -m)" in | ||
"ppc64le on ppc64le" | "s390x on s390x" | "x64 on x86_64") | ||
deb_arch= | ||
;; | ||
"ppc64le on "*) | ||
deb_arch=ppc64el | ||
gnu_arch=powerpc64le | ||
;; | ||
esac | ||
docker build --build-arg=deb_arch="$deb_arch" --build-arg=gnu_arch="$gnu_arch" "$@" "$basedir"/docker/image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters