From 9a23234c6c4f44b5cab74fec709b2a00ccbd07e0 Mon Sep 17 00:00:00 2001 From: yangdx Date: Thu, 16 Oct 2025 04:40:20 +0800 Subject: [PATCH] Add build script for multi-platform images - Add build script for multi-platform images - Update docker deployment document (cherry picked from commit ef79821f293454a1a5cae818e00c10a107e877a0) --- build-and-push.sh | 28 ++++++++++++++++++++++++++++ docs/DockerDeployment.md | 2 -- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100755 build-and-push.sh diff --git a/build-and-push.sh b/build-and-push.sh new file mode 100755 index 00000000..83973371 --- /dev/null +++ b/build-and-push.sh @@ -0,0 +1,28 @@ +#!/bin/bash +set -e + +# Configuration +IMAGE_NAME="ghcr.io/hkuds/lightrag" +DOCKERFILE="Dockerfile.offline" +TAG="offline" + +# Get version +VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "dev") + +echo "Building ${IMAGE_NAME}:${TAG} (version: ${VERSION})" + +# Build and push +docker buildx build \ + --platform linux/amd64,linux/arm64 \ + --file ${DOCKERFILE} \ + --tag ${IMAGE_NAME}:${TAG} \ + --tag ${IMAGE_NAME}:${VERSION}-${TAG} \ + --push \ + . + +echo "✓ Build complete!" +echo "Image pushed: ${IMAGE_NAME}:${TAG}" +echo "Version tag: ${IMAGE_NAME}:${VERSION}-${TAG}" + +# Verify +docker buildx imagetools inspect ${IMAGE_NAME}:${TAG} diff --git a/docs/DockerDeployment.md b/docs/DockerDeployment.md index 3f5e3fff..2a97504a 100644 --- a/docs/DockerDeployment.md +++ b/docs/DockerDeployment.md @@ -86,8 +86,6 @@ docker-compose up LightRAG provide an docker image can be deployment in offline environments where internet access is limited or unavailable. All you need to do is modify `docker-compose.yml`: change image tag from `latest` to `offline`. -> The offline Docker image does not include `docling` because its large size made integration into LightRAG internally impractical. This approach has been deprecated, and `docling` will be provided as a standalone service moving forward. - ## 📦 Build Multi-Architecture Docker Images ### Prerequisites