From 8fc41fb765a57046364057ce1ea72e25bd4a6fc2 Mon Sep 17 00:00:00 2001 From: Martin Schuppert Date: Mon, 13 Apr 2026 08:07:41 +0200 Subject: [PATCH] Remove go.work before container build The go.work file is generated by the CI environment which may have a higher Go version than the build image (go-toolset). This causes build failures when go.work references a Go version that the build image does not provide. Since the Dockerfile builds a single module, go.work is not needed and can be safely removed before building. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Martin Schuppert --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index cbc768ab..1a069a8f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,10 @@ WORKDIR $REMOTE_SOURCE_DIR/$REMOTE_SOURCE_SUBDIR USER root RUN mkdir -p ${DEST_ROOT}/usr/local/bin/ +# Remove go.work - not needed for the build and may reference a Go version +# from the CI environment that is higher than the build image provides +RUN rm -f go.work go.work.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 if [ ! -f $CACHITO_ENV_FILE ]; then go mod download ; fi