Lightweight Kubernetes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
597 B

6 years ago
#!/bin/bash
set -e
cd $(dirname $0)/..
6 years ago
5 years ago
. ./scripts/version.sh
TAG=${TAG:-${VERSION_TAG}${SUFFIX}}
6 years ago
REPO=${REPO:-rancher}
IMAGE_NAME=${IMAGE_NAME:-k3s}
6 years ago
IMAGE=${REPO}/${IMAGE_NAME}:${TAG}
PROXY_OPTS=
[ -z "$http_proxy" ] || PROXY_OPTS="$PROXY_OPTS --build-arg http_proxy=$http_proxy"
[ -z "$https_proxy" ] || PROXY_OPTS="$PROXY_OPTS --build-arg https_proxy=$https_proxy"
[ -z "$no_proxy" ] || PROXY_OPTS="$PROXY_OPTS --build-arg no_proxy=$no_proxy"
docker build ${PROXY_OPTS} --build-arg VERSION=${VERSION} -t ${IMAGE} -f package/Dockerfile .
./scripts/image_scan.sh ${IMAGE}
6 years ago
echo Built ${IMAGE}