add push script for docker images

This commit is contained in:
Jeffrey Morgan 2023-10-14 14:24:34 -04:00
parent 6479f49c09
commit 598621afab

15
scripts/push_docker.sh Executable file
View file

@ -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 \
.