From 598621afabd44797cfcc315892c274f08192dc58 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Sat, 14 Oct 2023 14:24:34 -0400 Subject: [PATCH] add push script for docker images --- scripts/push_docker.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 scripts/push_docker.sh diff --git a/scripts/push_docker.sh b/scripts/push_docker.sh new file mode 100755 index 00000000..3f3fb213 --- /dev/null +++ b/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 \ + .