k3s/scripts/package-image
Joakim Roubert 47e4e7b582
Dockerfile.dapper: Add proxy handling (#1499)
With this patch the dapper build will also work in environments behind
proxies.

Change-Id: I6d9c03d03d2e254043720fc7e77822826e4f38c8
Signed-off-by: Joakim Roubert <joakimr@axis.com>
2020-03-25 12:34:20 -07:00

19 lines
533 B
Bash
Executable File

#!/bin/bash
set -e
cd $(dirname $0)/..
. ./scripts/version.sh
TAG=${TAG:-${VERSION_TAG}${SUFFIX}}
REPO=${REPO:-rancher}
IMAGE_NAME=${IMAGE_NAME:-k3s}
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 .
echo Built ${IMAGE}