From 5271ff855979a42be8151cc0010812b2906589c3 Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Fri, 15 Aug 2025 14:39:35 -0700 Subject: [PATCH] handle cgo flags in docker build (#11909) Docker build requires build-args to be defined. This ensures the release.yaml settings will be used. --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 776fabebf7..0dc3c1267d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -86,6 +86,8 @@ RUN go mod download COPY . . ARG GOFLAGS="'-ldflags=-w -s'" ENV CGO_ENABLED=1 +ARG CGO_CFLAGS +ARG CGO_CXXFLAGS RUN --mount=type=cache,target=/root/.cache/go-build \ go build -trimpath -buildmode=pie -o /bin/ollama .