Quellcode durchsuchen

add push script for docker images

Jeffrey Morgan vor 1 Jahr
Ursprung
Commit
598621afab
1 geänderte Dateien mit 15 neuen und 0 gelöschten Zeilen
  1. 15 0
      scripts/push_docker.sh

+ 15 - 0
scripts/push_docker.sh

@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -eu
+
+export VERSION=${VERSION:-0.0.0}
+export GOFLAGS="'-ldflags=-w -s \"-X=github.com/jmorganca/ollama/version.Version=$VERSION\" \"-X=github.com/jmorganca/ollama/server.mode=release\"'"
+
+docker buildx build \
+    --push \
+    --platform=linux/arm64,linux/amd64 \
+    --build-arg=VERSION \
+    --build-arg=GOFLAGS \
+    -f Dockerfile \
+    -t ollama/ollama -t ollama/ollama:$VERSION \
+    .