4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 cd "$(dirname "$0")"/..
18 TAR_IMAGE="remote-installer.tar"
22 echo -e "$(basename $0) [-hs]"
23 echo -e " -h display this help"
24 echo -e " -s save image as tar to $TAR_IMAGE"
26 echo -e "Proxy configuration is taken from environment variables"
27 echo -e "http_proxy, https_proxy and no_proxy"
30 while getopts "hs" arg; do
45 --build-arg HTTP_PROXY="${http_proxy}" \
46 --build-arg HTTPS_PROXY="${https_proxy}" \
47 --build-arg NO_PROXY="${no_proxy}" \
48 --build-arg http_proxy="${http_proxy}" \
49 --build-arg https_proxy="${https_proxy}" \
50 --build-arg no_proxy="${no_proxy}" \
51 --tag remote-installer \
52 --file docker-build/remote-installer/Dockerfile .
55 # could be compressed but it's only used until there is an registry
56 if [ -n "$SAVE_IMAGE" ]
58 echo -e "Creating image tar ball at : $(dirname "$0")/$TAR_IMAGE"
59 docker image save remote-installer >"$(dirname "$0")"/"$TAR_IMAGE"