diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3ad11ad..b3d0872 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -66,7 +66,7 @@ jobs: strategy: max-parallel: 4 matrix: - go-version: [1.22.x] + go-version: [1.23.x] steps: - name: Checkout repository diff --git a/Dockerfile b/Dockerfile index d2ace23..3bdb8ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,35 +30,11 @@ # Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic ARG ARCH -# Build the manager binary -FROM golang:1.23 as builder - -WORKDIR /workspace -# Copy the Go Modules manifests -COPY go.mod go.mod -COPY go.sum go.sum -# cache deps before building and copying source so that we don't need to re-download as much -# and so that source changes don't invalidate our downloaded layer -RUN --mount=type=cache,target=/go/pkg/mod \ - go mod download - -# Copy the go source -COPY main.go main.go -COPY pkg/ pkg/ - -ARG ldflags - -# Build -RUN --mount=type=cache,target=/root/.cache/go-build \ - --mount=type=cache,target=/go/pkg/mod \ - CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \ - go build -trimpath -ldflags "${ldflags}" -a -o manager main.go - # 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:nonroot-${ARCH} WORKDIR / -COPY --from=builder /workspace/manager . +COPY manager managr USER 65532 ENTRYPOINT ["/manager"]