mirror of
https://github.com/rancher/os.git
synced 2025-06-26 06:51:40 +00:00
22 lines
513 B
Bash
Executable File
22 lines
513 B
Bash
Executable File
#!/bin/sh
|
|
set -ex
|
|
|
|
guessArch() {
|
|
docker version | grep 'OS/Arch:' | tail -n+2 | awk '{print $2}' | cut -f2 -d'/'
|
|
}
|
|
|
|
ARCH=${ARCH:-"$(guessArch)"}
|
|
ARCH=${ARCH:?"Failed to guess ARCH"}
|
|
export ARCH
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
[ -f "./.docker-env.${ARCH}" ] && . ./.docker-env.${ARCH} || echo "WARNING: missing .docker-env.${ARCH} (to use an ${ARCH} docker host)"
|
|
|
|
set -a
|
|
. ./build.conf.${ARCH}
|
|
set +a
|
|
|
|
docker inspect $DAPPER_BASE >/dev/null 2>&1 || docker pull $DAPPER_BASE
|
|
docker tag $DAPPER_BASE rancher/os-dapper-base
|