build(docker): Non tidy go mods fail image build (#1418)

fix(docker): Non tidy go mods fail image build
This commit is contained in:
PythonGermany 2025-12-06 23:48:39 +01:00 committed by GitHub
parent c5f7e5b82b
commit b0629773e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,7 +3,7 @@ FROM golang:alpine AS builder
RUN apk --update add ca-certificates RUN apk --update add ca-certificates
WORKDIR /app WORKDIR /app
COPY . ./ COPY . ./
RUN go mod tidy RUN go mod tidy -diff
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gatus . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gatus .
# Run Tests inside docker image if you don't have a configured go environment # Run Tests inside docker image if you don't have a configured go environment