From 4037fa04d4286a2c7e837841705e976b8c59184d Mon Sep 17 00:00:00 2001 From: Mickyleitor Date: Tue, 20 Jan 2026 21:42:28 +0100 Subject: [PATCH 1/2] Fix for Ollama installation using tar.zst format - Add zstd package required to decompress .tar.zst files - Change download URL from .tgz to .tar.zst (correct Ollama format) - Update tar command to use --zstd flag instead of -z --- Dockerfile-ollama-local | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile-ollama-local b/Dockerfile-ollama-local index ab0f5fc0c..318e44230 100644 --- a/Dockerfile-ollama-local +++ b/Dockerfile-ollama-local @@ -26,7 +26,9 @@ RUN python -m pip install poetry==2.0.1 --no-cache-dir && \ FROM python:3.11-slim AS ollama_base RUN apt-get update && apt-get install -y \ - curl + curl \ + zstd + # Detect architecture and download appropriate Ollama version # ARG TARGETARCH can be set at build time with --build-arg TARGETARCH=arm64 or TARGETARCH=amd64 ARG TARGETARCH=arm64 @@ -41,9 +43,9 @@ RUN OLLAMA_ARCH="" && \ echo "Error: Unsupported architecture '$TARGETARCH'. Supported architectures are 'arm64' and 'amd64'." >&2 && \ exit 1; \ fi && \ - curl -L "https://ollama.com/download/ollama-linux-${OLLAMA_ARCH}.tgz" -o ollama.tgz && \ - tar -C /usr -xzf ollama.tgz && \ - rm ollama.tgz + curl -L "https://ollama.com/download/ollama-linux-${OLLAMA_ARCH}.tar.zst" -o ollama.tar.zst && \ + tar --zstd -xf ollama.tar.zst -C /usr && \ + rm ollama.tar.zst RUN ollama serve > /dev/null 2>&1 & \ sleep 20 && \ From fb5fdd604e323aeb0dac25270a95f00b9ba3de3a Mon Sep 17 00:00:00 2001 From: Mickyleitor Date: Tue, 20 Jan 2026 21:44:16 +0100 Subject: [PATCH 2/2] Added cleanup of apt cache with rm -rf /var/lib/apt/lists/* to reduce image size for ollama image --- Dockerfile-ollama-local | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile-ollama-local b/Dockerfile-ollama-local index 318e44230..7c8c4a62d 100644 --- a/Dockerfile-ollama-local +++ b/Dockerfile-ollama-local @@ -27,7 +27,8 @@ RUN python -m pip install poetry==2.0.1 --no-cache-dir && \ FROM python:3.11-slim AS ollama_base RUN apt-get update && apt-get install -y \ curl \ - zstd + zstd && \ + rm -rf /var/lib/apt/lists/* # Detect architecture and download appropriate Ollama version # ARG TARGETARCH can be set at build time with --build-arg TARGETARCH=arm64 or TARGETARCH=amd64