mirror of
https://github.com/ollama/ollama.git
synced 2025-08-24 06:51:13 +02:00
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:
@@ -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 .
|
||||
|
||||
|
Reference in New Issue
Block a user