diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2018-01-16 16:07:49 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2018-02-12 10:24:05 +1100 |
commit | 915cea18e7618a884fc96f064e0ee980515dbcc9 (patch) | |
tree | 644a327ef3fa4bd43349942a136185372c86bf8c /ci/build.sh | |
parent | 98d7413f1d885a437a5a0a2f30ceb9c2cce9083b (diff) | |
download | blackbird-op-build-915cea18e7618a884fc96f064e0ee980515dbcc9.tar.gz blackbird-op-build-915cea18e7618a884fc96f064e0ee980515dbcc9.zip |
Update ci/ Dockerfiles to Fedora 27/Ubuntu 16.04LTS
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'ci/build.sh')
-rwxr-xr-x | ci/build.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/ci/build.sh b/ci/build.sh index 0ace0e1a..4e45262c 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -CONTAINERS="ubuntu1404 fedora25" +CONTAINERS="ubuntu1604 fedora27" while getopts ":ahp:c:" opt; do case $opt in @@ -64,21 +64,27 @@ do fi if [[ -n "$HTTP_PROXY" ]]; then http_proxy=$HTTP_PROXY + HTTP_PROXY_ENV="ENV http_proxy $HTTP_PROXY" + fi + if [[ -n "$HTTPS_PROXY" ]]; then + https_proxy=$HTTPS_PROXY + HTTPS_PROXY_ENV="ENV https_proxy $HTTPS_PROXY" fi if [[ -n "$http_proxy" ]]; then - if [[ "$distro" == fedora25 ]]; then + if [[ "$distro" == fedora27 ]]; then PROXY="RUN echo \"proxy=${http_proxy}\" >> /etc/dnf/dnf.conf" fi - if [[ "$distro" == ubuntu1404 ]]; then + if [[ "$distro" == ubuntu1604 ]]; then PROXY="RUN echo \"Acquire::http::Proxy \\"\"${http_proxy}/\\"\";\" > /etc/apt/apt.conf.d/000apt-cacher-ng-proxy" fi fi Dockerfile=$(head -n1 $base_dockerfile; echo ${PROXY}; tail -n +2 $base_dockerfile; cat << EOF -RUN groupadd -g ${GROUPS} ${USER} && useradd -d ${HOME} -m -u ${UID} -g ${GROUPS} ${USER} ${PROXY} -USER ${USER} +RUN useradd -d ${HOME} -m -u ${UID} ${USER} ENV HOME ${HOME} +${HTTP_PROXY_ENV} +${HTTPS_PROXY_ENV} EOF ) $DOCKER_PREFIX docker build -t openpower/op-build-$distro - <<< "${Dockerfile}" |