Add build script for multi-platform images

- Add build script for multi-platform images
- Update docker deployment document

(cherry picked from commit ef79821f29)
This commit is contained in:
yangdx 2025-10-16 04:40:20 +08:00 committed by Raphaël MANSUY
parent aa61e82820
commit 9a23234c6c
2 changed files with 28 additions and 2 deletions

28
build-and-push.sh Executable file
View file

@ -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}

View file

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