Sha256: fcebb29ca122fe4656639a52d7857df8bc095114862072bf7946b8c05c623ec4
Contents?: true
Size: 1.44 KB
Versions: 4
Compression:
Stored size: 1.44 KB
Contents
#!/bin/bash # # (c) Copyright 2014 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. function usage { echo "usage is $0 [--help][-t user/repo:version] Script to build a docker image. It takes your local setting of $http_proxy to build the image with the same proxy If the proxy is not set, the docker image is simply executed, without proxy. Options : - help: is the current help - t : Tag the image built. Respect the tag format use by docker -t option. " } if [ "p$1" = "p--help" ] then usage exit fi if [ "p$1" = "p-t" ] && [ "p$2" != "" ] then TAG="-t $2" fi if [ "$http_proxy" = "" ] then echo "Currently, no proxy is set. Running docker without proxy" docker build $TAG . exit fi mkdir .tmp awk '$0 ~ /RUN \/tmp\/proxy.sh/ { print "ENV http_proxy '"$http_proxy"'" } $0 ~ // { print $0 } ' Dockerfile > .tmp/Dockerfile cp -rp files tmp .tmp/ docker build $TAG .tmp rm -fr .tmp
Version data entries
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
subhash-0.1.5 | build/build_with_proxy.sh |
subhash-0.1.4 | build/build_with_proxy.sh |
config_layers-0.1.5 | build/build_with_proxy.sh |
subhash-0.1.3 | build/build_with_proxy.sh |