mirror of
https://github.com/rancher/rke.git
synced 2025-06-24 14:31:59 +00:00
25 lines
384 B
Plaintext
25 lines
384 B
Plaintext
|
#!/bin/bash
|
||
|
set -e
|
||
|
|
||
|
source $(dirname $0)/version
|
||
|
|
||
|
ARCH=${ARCH:-"amd64"}
|
||
|
SUFFIX=""
|
||
|
[ "${ARCH}" != "amd64" ] && SUFFIX="_${ARCH}"
|
||
|
|
||
|
cd $(dirname $0)/../package
|
||
|
|
||
|
TAG=${TAG:-${VERSION}${SUFFIX}}
|
||
|
REPO=${REPO:-rancher}
|
||
|
|
||
|
if echo $TAG | grep -q dirty; then
|
||
|
TAG=dev
|
||
|
fi
|
||
|
|
||
|
cp ../bin/rke .
|
||
|
|
||
|
IMAGE=${REPO}/rke:${TAG}
|
||
|
docker build -t ${IMAGE} .
|
||
|
echo ${IMAGE} > ../dist/images
|
||
|
echo Built ${IMAGE}
|