From: Balazs Szekeres Date: Fri, 30 Aug 2019 14:16:53 +0000 (+0200) Subject: Go version update to 1.12.9 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;ds=sidebyside;h=refs%2Fchanges%2F13%2F1513%2F10;p=ta%2Fcaas-kubedns.git Go version update to 1.12.9 Change-Id: Idb89bd0457419bbeb3655ec5d8c40b2902f34fe6 Signed-off-by: Balazs Szekeres --- diff --git a/docker-build/kubedns/Dockerfile b/docker-build/kubedns/Dockerfile index 5fedec1..6182bd7 100644 --- a/docker-build/kubedns/Dockerfile +++ b/docker-build/kubedns/Dockerfile @@ -15,10 +15,11 @@ FROM alpine:3.9 MAINTAINER Balazs Szekeres -ARG KUBEDNS -ENV KUBEDNS_VERSION=$KUBEDNS +ARG KUBEDNS_VERSION ENV GOPATH /build -ENV PATH /usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ARG go_install_dir="/usr/local/go" +ARG go_version +ENV PATH="$go_install_dir/bin:$PATH" RUN apk update \ && apk upgrade \ @@ -30,6 +31,10 @@ RUN apk update \ && chown -R kubedns:kubedns /etc \ && apk add --no-cache --virtual .build-deps build-base git mercurial go glide bash tar curl \ && apk add --no-cache dnsmasq \ +&& mkdir -p $go_install_dir \ +&& curl -fsSL -k https://dl.google.com/go/go${go_version}.src.tar.gz | tar zx --strip-components=1 -C ${go_install_dir} \ +&& cd ${go_install_dir}/src/ \ +&& ./make.bash \ && mkdir -p $GOPATH/src/k8s.io/dns \ && curl -fsSL -k https://github.com/kubernetes/dns/archive/${KUBEDNS_VERSION}.tar.gz | tar zx --strip-components=1 -C $GOPATH/src/k8s.io/dns \ && cd $GOPATH/src/k8s.io/dns \ @@ -39,6 +44,7 @@ RUN apk update \ && setcap 'cap_net_bind_service=+ep' /usr/sbin/dnsmasq \ && apk del .build-deps \ && rm -rf $GOPATH \ +&& rm -rf $go_install_dir \ && rm -rf /build \ && rm -rf /root/.glide diff --git a/rpmbuild.spec b/rpmbuild.spec index 8eabcbd..cfb8c6d 100644 --- a/rpmbuild.spec +++ b/rpmbuild.spec @@ -15,8 +15,9 @@ %define COMPONENT kubedns %define RPM_NAME caas-%{COMPONENT} %define RPM_MAJOR_VERSION 1.15.4 -%define RPM_MINOR_VERSION 2 +%define RPM_MINOR_VERSION 3 %define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION} +%define go_version 1.12.9 Name: %{RPM_NAME} Version: %{RPM_MAJOR_VERSION} @@ -49,7 +50,8 @@ docker build \ --build-arg http_proxy="${http_proxy}" \ --build-arg https_proxy="${https_proxy}" \ --build-arg no_proxy="${no_proxy}" \ - --build-arg KUBEDNS="%{RPM_MAJOR_VERSION}" \ + --build-arg KUBEDNS_VERSION="%{RPM_MAJOR_VERSION}" \ + --build-arg go_version="%{go_version}" \ --tag %{COMPONENT}:%{IMAGE_TAG} \ %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build/%{COMPONENT}/