handle cgo flags in docker build (#11909)

Docker build requires build-args to be defined.  This ensures the release.yaml settings will be used.
This commit is contained in:
Daniel Hiltgen
2025-08-15 14:39:35 -07:00
committed by GitHub
parent d6f7233a1c
commit 5271ff8559

View File

@@ -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 .