#!/bin/bash
set -e

source $(dirname $0)/version

pushd $DAPPER_SOURCE

if [ -f bin/kube-explorer-linux-${ARCH} ]; then
    # For cross mode
    cp bin/kube-explorer-linux-${ARCH} package/kube-explorer
else
    # For common mode
    cp bin/kube-explorer package/
fi
cd package
docker build -f Dockerfile -t niusmallnan/kube-explorer:$VERSION .

popd
