From b223183e01ddce0f48859324179debfac5c70a77 Mon Sep 17 00:00:00 2001 From: Jayesh Srivastava Date: Sun, 12 May 2024 20:34:06 +0530 Subject: [PATCH] PSS-23921: Update builder image and fix go dependencies (#55) --- Dockerfile | 7 ++++--- go.mod | 4 ++-- go.sum | 7 ++++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 936ec29..a5c5662 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,9 +32,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/root/.local/share/golang \ if [ ${CRYPTO_LIB} ];\ then \ - GOARCH=${ARCH} go-build-fips.sh -a -o manager . ;\ + GOARCH=${ARCH} go-build-fips.sh -a -o manager github.com/spectrocloud/cluster-api-provider-vsphere-static-ip ;\ else \ - GOARCH=${ARCH} go-build-static.sh -a -o manager . ;\ + GOARCH=${ARCH} go-build-static.sh -a -o manager github.com/spectrocloud/cluster-api-provider-vsphere-static-ip ;\ fi RUN if [ "${CRYPTO_LIB}" ]; then assert-static.sh manager; fi @@ -45,10 +45,11 @@ RUN scan-govulncheck.sh manager # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details #FROM gcr.io/distroless/static:latest -FROM alpine:3.18 +FROM gcr.io/spectro-images-public/build-base-images/openssl-fips-ktls:3.2-alpine3.19 RUN rm /usr/lib/engines-3/padlock.so RUN rm /lib/libcrypto.so.3 RUN rm /usr/lib/ossl-modules/legacy.so +RUN rm -rf /opt/openssl-* RUN addgroup -S spectro RUN adduser -S -D -h / spectro spectro USER spectro diff --git a/go.mod b/go.mod index 9e6eebe..650caf4 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/coredns/caddy v1.1.0 // indirect github.com/coredns/corefile-migration v1.0.12 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/docker/distribution v2.8.0+incompatible // indirect + github.com/docker/distribution v2.8.2-beta.1+incompatible // indirect github.com/evanphx/json-patch v4.11.0+incompatible // indirect github.com/fsnotify/fsnotify v1.4.9 // indirect github.com/gobuffalo/flect v0.2.3 // indirect @@ -63,7 +63,7 @@ require ( golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.26.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 3a37516..654c276 100644 --- a/go.sum +++ b/go.sum @@ -272,8 +272,8 @@ github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyG github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.8.0+incompatible h1:l9EaZDICImO1ngI+uTifW+ZYvvz7fKISBAKpg+MbWbY= -github.com/docker/distribution v2.8.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.2-beta.1+incompatible h1:gILO60VLD2v28ozemv4aAwDb8ds5U2O/vD/sBXbd7Rw= +github.com/docker/distribution v2.8.2-beta.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= @@ -1335,8 +1335,9 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=