Update golang version (at least >= 1.16)

Currently golang community supports 1.16 and later, hence, need
to update golang version in our build pipeline. This change
updates golang version to 1.17/1.16.
This commit is contained in:
Tomofumi Hayashi
2021-09-14 01:05:41 +09:00
parent a28f5cb56c
commit 35fdb29385
8 changed files with 12 additions and 22 deletions

View File

@@ -1,16 +1,11 @@
# This Dockerfile is used to build the image available on DockerHub
FROM centos:centos7 as build
FROM golang:1.17.1 as build
# Add everything
ADD . /usr/src/multus-cni
ENV INSTALL_PKGS "git golang-1.15.13-0.el7.x86_64"
RUN rpm --import https://mirror.go-repo.io/centos/RPM-GPG-KEY-GO-REPO && \
curl -s https://mirror.go-repo.io/centos/go-repo.repo | tee /etc/yum.repos.d/go-repo.repo && \
yum install -y $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
cd /usr/src/multus-cni && \
./hack/build-go.sh
RUN cd /usr/src/multus-cni && \
./hack/build-go.sh
FROM centos:centos7
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/multus-cni

View File

@@ -1,5 +1,5 @@
# This Dockerfile is used to build the image available on DockerHub
FROM golang:1.13.4 as build
FROM golang:1.17.1 as build
# Add everything
ADD . /usr/src/multus-cni

View File

@@ -1,5 +1,5 @@
# This Dockerfile is used to build the image available on DockerHub
FROM golang:1.13.4 as build
FROM golang:1.17.1 as build
# Add everything
ADD . /usr/src/multus-cni

View File

@@ -1,5 +1,5 @@
# This dockerfile is specific to building Multus for OpenShift
FROM openshift/origin-release:golang-1.15 as builder
FROM openshift/origin-release:golang-1.16 as builder
ADD . /usr/src/multus-cni

View File

@@ -1,5 +1,5 @@
# This Dockerfile is used to build the image available on DockerHub
FROM centos:centos7 as build
FROM golang:1.17.1 as build
# Add everything
ADD . /usr/src/multus-cni
@@ -7,13 +7,8 @@ ADD . /usr/src/multus-cni
ENV GOARCH "ppc64le"
ENV GOOS "linux"
ENV INSTALL_PKGS "git golang"
RUN rpm --import https://mirror.go-repo.io/centos/RPM-GPG-KEY-GO-REPO && \
curl -s https://mirror.go-repo.io/centos/go-repo.repo | tee /etc/yum.repos.d/go-repo.repo && \
yum install -y $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
cd /usr/src/multus-cni && \
./hack/build-go.sh
RUN cd /usr/src/multus-cni && \
./hack/build-go.sh
# build ppc container
FROM ppc64le/centos:latest

View File

@@ -1,5 +1,5 @@
# This Dockerfile is used to build the image available on DockerHub
FROM golang:1.13 as build
FROM golang:1.17 as build
# Add everything
ADD . /usr/src/multus-cni