push_docker.sh 393 B

12345678910111213141516
  1. #!/bin/sh
  2. set -eu
  3. export VERSION=${VERSION:-0.0.0}
  4. export GOFLAGS="'-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=$VERSION\" \"-X=github.com/ollama/ollama/server.mode=release\"'"
  5. docker build \
  6. --push \
  7. --platform=linux/arm64,linux/amd64 \
  8. --build-arg=VERSION \
  9. --build-arg=GOFLAGS \
  10. -f Dockerfile \
  11. -t ollama/ollama -t ollama/ollama:$VERSION \
  12. .