From 9356ef5e34678d73d28d2119298041bf409db1c6 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Mon, 31 May 2021 08:45:19 +0300 Subject: [PATCH] Switch to go 1.15 Signed-off-by: Anatolii Bazko --- build/dockerfiles/rhel.Dockerfile | 11 +++++++---- go.mod | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/build/dockerfiles/rhel.Dockerfile b/build/dockerfiles/rhel.Dockerfile index 607f086f2..9b32e36b4 100644 --- a/build/dockerfiles/rhel.Dockerfile +++ b/build/dockerfiles/rhel.Dockerfile @@ -9,9 +9,12 @@ # Red Hat, Inc. - initial API and implementation # -# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8/go-toolset -FROM registry.access.redhat.com/ubi8/go-toolset:1.14.12-17.1618436992 as builder -ENV GOPATH=/go/ +# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8-minimal +FROM registry.access.redhat.com/ubi8-minimal:8.4 as builder +# shadow-utils is needed to install `adduser` tool +RUN microdnf install -y golang shadow-utils && \ + go version + USER root WORKDIR /che-machine-exec/ COPY . . @@ -24,7 +27,7 @@ RUN adduser unprivilegeduser && \ CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -ldflags '-w -s' -a -installsuffix cgo -o che-machine-exec . && \ mkdir -p /rootfs/tmp /rootfs/etc /rootfs/go/bin && \ # In the `scratch` you can't use Dockerfile#RUN, because there is no shell and no standard commands (mkdir and so on). - # That's why prepare absent `/tmp` folder for scratch image + # That's why prepare absent `/tmp` folder for scratch image chmod 1777 /rootfs/tmp && \ cp -rf /etc/passwd /rootfs/etc && \ cp -rf /che-machine-exec/che-machine-exec /rootfs/go/bin diff --git a/go.mod b/go.mod index a12291114..9899ba621 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/eclipse-che/che-machine-exec -go 1.14 +go 1.15 replace ( cloud.google.com/go => cloud.google.com/go v0.54.0