mirror of https://github.com/ollama/ollama.git
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:
parent
1d18f2de74
commit
d0309aa801
|
@ -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 .
|
||||
|
||||
|
|
Loading…
Reference in New Issue