k3s/scripts/package-image

19 lines
533 B
Plaintext
Raw Normal View History

2019-01-01 08:23:01 +00:00
#!/bin/bash
set -e
2019-02-05 04:42:35 +00:00
cd $(dirname $0)/..
2019-01-01 08:23:01 +00:00
2019-11-12 23:36:04 +00:00
. ./scripts/version.sh
2019-12-12 01:53:02 +00:00
TAG=${TAG:-${VERSION_TAG}${SUFFIX}}
2019-01-01 08:23:01 +00:00
REPO=${REPO:-rancher}
2019-01-09 16:54:15 +00:00
IMAGE_NAME=${IMAGE_NAME:-k3s}
2019-01-01 08:23:01 +00:00
2019-01-09 16:54:15 +00:00
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} -t ${IMAGE} -f package/Dockerfile .
2019-01-01 08:23:01 +00:00
echo Built ${IMAGE}