From 4fc949c915345a91ae96faa1a51cb042a7d446b5 Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Mon, 11 Apr 2022 15:11:28 +0300 Subject: [PATCH] Fixed compilation on Ubuntu. Updated go version for Ubuntu to 1.17 --- Dockerfiles/build-base/ol/Dockerfile | 8 +++---- Dockerfiles/build-base/rhel/Dockerfile | 13 +++++----- Dockerfiles/build-base/ubuntu/Dockerfile | 30 +++++++++++++++++------- 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/Dockerfiles/build-base/ol/Dockerfile b/Dockerfiles/build-base/ol/Dockerfile index 1ae849ea3..33593ff34 100644 --- a/Dockerfiles/build-base/ol/Dockerfile +++ b/Dockerfiles/build-base/ol/Dockerfile @@ -54,12 +54,12 @@ RUN set -eux && \ ARCH_SUFFIX="$(arch)"; \ case "$ARCH_SUFFIX" in \ x86_64) \ - url='https://dl.google.com/go/go1.17.2.linux-amd64.tar.gz'; \ - sha256='f242a9db6a0ad1846de7b6d94d507915d14062660616a61ef7c808a76e4f1676'; \ + url='https://dl.google.com/go/go1.17.8.linux-amd64.tar.gz'; \ + sha256='980e65a863377e69fd9b67df9d8395fd8e93858e7a24c9f55803421e453f4f99'; \ ;; \ aarch64) \ - url='https://dl.google.com/go/go1.17.2.linux-arm64.tar.gz'; \ - sha256='a5a43c9cdabdb9f371d56951b14290eba8ce2f9b0db48fb5fc657943984fd4fc'; \ + url='https://dl.google.com/go/go1.17.8.linux-arm64.tar.gz'; \ + sha256='57a9171682e297df1a5bd287be056ed0280195ad079af90af16dcad4f64710cb'; \ ;; \ *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ esac; \ diff --git a/Dockerfiles/build-base/rhel/Dockerfile b/Dockerfiles/build-base/rhel/Dockerfile index da1b04241..24b8099a8 100644 --- a/Dockerfiles/build-base/rhel/Dockerfile +++ b/Dockerfiles/build-base/rhel/Dockerfile @@ -66,19 +66,18 @@ RUN set -eux && \ --best \ --setopt=tsflags=nodocs \ ${INSTALL_PKGS} && \ - ARCH_SUFFIX="$(arch)"; \ case "$ARCH_SUFFIX" in \ x86_64) \ - url='https://dl.google.com/go/go1.17.2.linux-amd64.tar.gz'; \ - sha256='f242a9db6a0ad1846de7b6d94d507915d14062660616a61ef7c808a76e4f1676'; \ + url='https://dl.google.com/go/go1.17.8.linux-amd64.tar.gz'; \ + sha256='980e65a863377e69fd9b67df9d8395fd8e93858e7a24c9f55803421e453f4f99'; \ ;; \ aarch64) \ - url='https://dl.google.com/go/go1.17.2.linux-arm64.tar.gz'; \ - sha256='a5a43c9cdabdb9f371d56951b14290eba8ce2f9b0db48fb5fc657943984fd4fc'; \ + url='https://dl.google.com/go/go1.17.8.linux-arm64.tar.gz'; \ + sha256='57a9171682e297df1a5bd287be056ed0280195ad079af90af16dcad4f64710cb'; \ ;; \ ppc64le) \ - url='https://golang.org/dl/go1.17.2.linux-ppc64le.tar.gz'; \ - sha256='12e2dc7e0ffeebe77083f267ef6705fec1621cdf2ed6489b3af04a13597ed68d'; \ + url='https://dl.google.com/go/go1.17.8.linux-ppc64le.tar.gz'; \ + sha256='2077dd2fc57a74b0630b0c239ae4e3114607311778effd43fcfe5174133ee188'; \ ;; \ *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ esac; \ diff --git a/Dockerfiles/build-base/ubuntu/Dockerfile b/Dockerfiles/build-base/ubuntu/Dockerfile index de07190dd..476cd14c7 100644 --- a/Dockerfiles/build-base/ubuntu/Dockerfile +++ b/Dockerfiles/build-base/ubuntu/Dockerfile @@ -5,8 +5,8 @@ ARG MAJOR_VERSION=6.0 ARG ZBX_VERSION=${MAJOR_VERSION}.3 ENV TERM=xterm \ - ZBX_VERSION=${ZBX_VERSION} \ - PATH=/usr/lib/go-1.16/bin:$PATH + ZBX_VERSION=${ZBX_VERSION} \ + PATH=/usr/local/go/bin:$PATH LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix images" \ @@ -42,7 +42,7 @@ RUN set -eux && \ gettext \ git \ gnupg \ - wget \ + curl \ unixodbc-dev" && \ apt-get -y update && \ DEBIAN_FRONTEND=noninteractive apt-get -y \ @@ -51,17 +51,29 @@ RUN set -eux && \ ARCH_SUFFIX="$(arch)"; \ case "$ARCH_SUFFIX" in \ x86_64) \ - url='https://dl.google.com/go/go1.17.2.linux-amd64.tar.gz'; \ - sha256='f242a9db6a0ad1846de7b6d94d507915d14062660616a61ef7c808a76e4f1676'; \ + url='https://dl.google.com/go/go1.17.8.linux-amd64.tar.gz'; \ + sha256='980e65a863377e69fd9b67df9d8395fd8e93858e7a24c9f55803421e453f4f99'; \ ;; \ aarch64) \ - url='https://dl.google.com/go/go1.17.2.linux-arm64.tar.gz'; \ - sha256='a5a43c9cdabdb9f371d56951b14290eba8ce2f9b0db48fb5fc657943984fd4fc'; \ + url='https://dl.google.com/go/go1.17.8.linux-arm64.tar.gz'; \ + sha256='57a9171682e297df1a5bd287be056ed0280195ad079af90af16dcad4f64710cb'; \ + ;; \ + armv7l) \ + url='https://dl.google.com/go/go1.17.8.linux-armv6l.tar.gz'; \ + sha256='3287ca2fe6819fa87af95182d5942bf4fa565aff8f145812c6c70c0466ce25ae'; \ + ;; \ + s390x) \ + url='https://dl.google.com/go/go1.17.8.linux-s390x.tar.gz'; \ + sha256='3fac23801644a2f93a1643acecd5a94a5ea05d88e19467092fb6e64205710f61'; \ + ;; \ + ppc64le) \ + url='https://dl.google.com/go/go1.17.8.linux-ppc64le.tar.gz'; \ + sha256='2077dd2fc57a74b0630b0c239ae4e3114607311778effd43fcfe5174133ee188'; \ ;; \ *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ esac; \ - wget -O go.tgz.asc "$url.asc" && \ - wget -O go.tgz "$url" --progress=dot:giga && \ + curl "$url.asc" --output go.tgz.asc && \ + curl "$url" --output go.tgz && \ echo "$sha256 *go.tgz" | sha256sum -c - && \ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 'EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796' && \