Skip to content

Commit f18a118

Browse files
stuggiclaude
authored andcommitted
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 <noreply@anthropic.com> Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
1 parent 2820640 commit f18a118

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ WORKDIR $REMOTE_SOURCE_DIR/$REMOTE_SOURCE_SUBDIR
1919
USER root
2020
RUN mkdir -p ${DEST_ROOT}/usr/local/bin/
2121

22+
# Remove go.work - not needed for the build and may reference a Go version
23+
# from the CI environment that is higher than the build image provides
24+
RUN rm -f go.work go.work.sum
25+
2226
# cache deps before building and copying source so that we don't need to re-download as much
2327
# and so that source changes don't invalidate our downloaded layer
2428
RUN if [ ! -f $CACHITO_ENV_FILE ]; then go mod download ; fi

0 commit comments

Comments
 (0)