Merge pull request #192 from houstar/master

rootfs.sh: enable curl use http_proxy
This commit is contained in:
Marco Vedovati 2018-11-09 12:09:45 +01:00 committed by GitHub
commit 14e5bc02ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -170,8 +170,10 @@ generate_dockerfile()
[ -n "$http_proxy" ] && readonly set_proxy="RUN sed -i '$ a proxy="$http_proxy"' /etc/dnf/dnf.conf /etc/yum.conf; true"
curlOptions=("-OL")
[ -n "$http_proxy" ] && curlOptions+=("-x $http_proxy")
readonly install_go="
RUN cd /tmp ; curl -OL https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${goarch}.tar.gz
RUN cd /tmp ; curl ${curlOptions[@]} https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${goarch}.tar.gz
RUN tar -C /usr/ -xzf /tmp/go${GO_VERSION}.linux-${goarch}.tar.gz
ENV GOROOT=/usr/go
ENV PATH=\$PATH:\$GOROOT/bin:\$GOPATH/bin