mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-18 11:47:07 +00:00
Fix version injection for docker builds
- Add OLLAMA_VERSION build arg to Dockerfiles - Update Makefile to pass version via --build-arg - Add .env.example as local development reference - Update build.yml to use cicd-1 environment for vars.OLLAMA_VERSION Fixes #8 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,9 @@ RUN bash -c 'LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:/usr/lib64:$LD_LIBR
|
||||
# Build Go binary
|
||||
# VCS info is embedded automatically since we cloned from git
|
||||
# Build to source directory so binary can find libraries via relative path
|
||||
RUN go build -o ./ollama .
|
||||
# Set version via -ldflags - pass OLLAMA_VERSION as build arg
|
||||
ARG OLLAMA_VERSION
|
||||
RUN go build -ldflags "-X github.com/ollama/ollama/version.Version=${OLLAMA_VERSION}" -o ./ollama .
|
||||
|
||||
# Create symlink to standard binary location
|
||||
# The code in ml/path.go uses filepath.EvalSymlinks() which resolves this symlink
|
||||
|
||||
@@ -36,7 +36,9 @@ RUN bash -c 'LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:/usr/lib64:$LD_LIBR
|
||||
|
||||
# Build Go binary
|
||||
# Build to source directory so binary can find libraries via relative path
|
||||
RUN go build -o ./ollama .
|
||||
# Set version via -ldflags - pass OLLAMA_VERSION as build arg
|
||||
ARG OLLAMA_VERSION
|
||||
RUN go build -ldflags "-X github.com/ollama/ollama/version.Version=${OLLAMA_VERSION}" -o ./ollama .
|
||||
|
||||
# Create symlink to standard binary location
|
||||
# The code in ml/path.go uses filepath.EvalSymlinks() which resolves this symlink
|
||||
|
||||
Reference in New Issue
Block a user