Remove go mod tidy from Docker build
go mod tidy in Docker build causes disk space issues on CI runners (compiling modernc.org/ccgo pulls many C files). go.mod/go.sum are committed to repo, so go mod download + go build is sufficient.
This commit is contained in:
1 parent
7ddf43158a
commit
03ef94b033
1 file changed
+2
-2
+2
-2
@@ -13,8 +13,8 @@ RUN go mod download
|
||||
# Copy source
|
||||
COPY . .
|
||||
|
||||
# Tidy and build binary
|
||||
RUN go mod tidy && CGO_ENABLED=0 GOOS=linux go build -o /ym-dl ./cmd/ym-dl
|
||||
# Build binary
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /ym-dl ./cmd/ym-dl
|
||||
|
||||
# Runtime stage
|
||||
FROM gcr.io/distroless/static-debian12:nonroot
|
||||
|
||||
Reference in new issue
Block a user