Build DuckDB with the ui extension and import sources via a build context

- Build the ui extension (pinned duckdb-ui commit for DuckDB 1.5.6) into
  DuckDB on debian13 and rocky9 so the shell supports -ui.
- Add fetch-sources.sh, which downloads source archives with aria2c into the
  git-ignored sources/ repository.
- debian13: replace per-dependency downloads with
  RUN --mount=type=bind,from=sources, passed by build.sh through
  --build-context, so archives are not stored in image layers.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GuofangandClaude Sonnet 5.5 committed 2026-10-26 14:02:15 +08:00
1 parent 659dd05269
commit df7af62648
5 files changed
+321 -278

No files matched your search

+7 -1
View File
@@ -781,7 +781,13 @@ RUN curl --fail --location --output duckdb.tar.gz \
&& mkdir src \
&& tar --extract --gzip --file=duckdb.tar.gz --directory=src --strip-components=1 \
&& rm duckdb.tar.gz \
&& curl --fail --location --output duckdb-ui.tar.gz \
https://wangguofang.net/github.com/duckdb/duckdb-ui/archive/0628932f74b1e2e9eaf68a05b22d737455541dca.tar.gz \
&& mkdir ui-src \
&& tar --extract --gzip --file=duckdb-ui.tar.gz --directory=ui-src --strip-components=1 \
&& rm duckdb-ui.tar.gz \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DDUCKDB_EXTENSION_CONFIGS="$PWD/ui-src/extension_config.cmake" \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_EXTENSIONS="core_functions;parquet;json" \
-DBUILD_SHELL=ON \
@@ -792,6 +798,6 @@ RUN curl --fail --location --output duckdb.tar.gz \
-DCMAKE_INSTALL_LIBDIR=lib64 \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
&& rm -rf build src ui-src
CMD ["/bin/bash"]