From b33e7412291834b30ac0fed7769300b25dee00c4 Mon Sep 17 00:00:00 2001 From: tellet-q <166374656+tellet-q@users.noreply.github.com> Date: Wed, 6 Aug 2025 11:24:16 +0200 Subject: [PATCH] Hardcode the link (#6985) * Hardcode the link * Fix image build --- Dockerfile | 9 +++++---- tools/sync-web-ui.sh | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 10a0c43d7b..234822e46b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -84,6 +84,11 @@ ARG LINKER=mold # Enable GPU support ARG GPU +# Download and extract web UI +COPY tools/ tools/ +COPY docs/ docs/ +RUN mkdir /static && STATIC_DIR=/static ./tools/sync-web-ui.sh + COPY --from=planner /qdrant/recipe.json recipe.json # `PKG_CONFIG=...` is a workaround for `xx-cargo` bug for crates using `pkg-config`! # @@ -108,10 +113,6 @@ RUN PKG_CONFIG="/usr/bin/$(xx-info)-pkg-config" \ && PROFILE_DIR=$(if [ "$PROFILE" = dev ]; then echo debug; else echo $PROFILE; fi) \ && mv target/$(xx-cargo --print-target-triple)/$PROFILE_DIR/qdrant /qdrant/qdrant -# Download and extract web UI -RUN mkdir /static && STATIC_DIR=/static ./tools/sync-web-ui.sh - - # Dockerfile does not support conditional `FROM` directly. # To workaround this limitation, we use a multi-stage build with a different base images which have equal name to ARG value. diff --git a/tools/sync-web-ui.sh b/tools/sync-web-ui.sh index 6da6ddce03..4022fdec6d 100755 --- a/tools/sync-web-ui.sh +++ b/tools/sync-web-ui.sh @@ -7,8 +7,8 @@ OPENAPI_FILE=${OPENAPI_DIR:-"./docs/redoc/master/openapi.json"} # Download `dist.zip` from the latest release of https://github.com/qdrant/qdrant-web-ui and unzip given folder -# Get latest dist.zip, assume jq is installed -DOWNLOAD_LINK=$(curl --retry 5 --retry-all-errors --silent "https://api.github.com/repos/qdrant/qdrant-web-ui/releases/latest" | jq -r '.assets[] | select(.name=="dist-qdrant.zip") | .browser_download_url') +# Get latest dist.zip +DOWNLOAD_LINK="https://github.com/qdrant/qdrant-web-ui/releases/latest/download/dist-qdrant.zip" if command -v wget &> /dev/null then