1
0
mirror of https://github.com/rancher/os.git synced 2025-06-22 21:17:02 +00:00
os/scripts/dapper-common

22 lines
513 B
Plaintext
Raw Normal View History

#!/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