openstack-helm-images/calicoctl-utility/build.sh
Deepak Tiwari 0908d43c58 Makefile and Docker file for calicoctl-utility containers
Change-Id: Ia3442e3b5b89bf27e30c1f524dca8e63c4e3cea9
2019-04-09 16:18:59 -05:00

21 lines
491 B
Bash
Executable File

#!/bin/bash
SCRIPT=`realpath $0`
SCRIPT_DIR=`dirname ${SCRIPT}`
## Only build from main folder
cd ${SCRIPT_DIR}/..
IMAGE="calicoctl-utility"
VERSION=${VERSION:-v3.4.4}
DISTRO=${DISTRO:-alpine}
REGISTRY_URI=${REGISTRY_URI:-"openstackhelm/"}
EXTRA_TAG_INFO=${EXTRA_TAG_INFO:-""}
docker build -f ${IMAGE}/Dockerfile.${DISTRO} \
--network=host \
--build-arg CALICOCTL_VERSION=${VERSION} \
-t ${REGISTRY_URI}${IMAGE}:${VERSION}-${DISTRO}${EXTRA_TAG_INFO} \
${extra_build_args} \
${IMAGE}
cd -