FROM ubuntu:jammy-20260217
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
ninja-build \
git \
python3 \
python3-pip \
pkg-config \
libssl-dev \
libcurl4-openssl-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
# Build from the repository root
WORKDIR /duckdb
# Copy source code
COPY . .
# Configure and build using Ninja
RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
&& cmake --build build --config Release
# Default to a shell so the container can be inspected or run custom commands
CMD ["bash"]
# Ignore Git and build artifacts .git build/ cache/ *.o *.a *.so *.dll *.dylib CMakeFiles CMakeCache.txt cmake_install.cmake Makefile .DS_Store *.log *.pytest_cache # Ignore IDEs *.idea/ *.vscode/
Build timed out after 600s
FROM ubuntu:jammy-20260217 as builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
ninja-build \
git \
python3 \
python3-pip \
pkg-config \
libssl-dev \
libcurl4-openssl-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /duckdb
# Copy source code
COPY . .
# Configure and build using Ninja
RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
&& cmake --build build --config Release
# Install built artifacts into /usr/local
RUN cmake --install build --prefix /usr/local
RUN ldconfig
# Runtime stage
FROM ubuntu:jammy-20260217
ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
ENV DEBIAN_FRONTEND=noninteractive
# Copy installed binaries/libraries from builder
COPY --from=builder /usr/local /usr/local
WORKDIR /duckdb
# Expose a shell by default for debugging; user can run duckdb from /usr/local/bin
CMD ["bash"]
Build timed out after 600s
FROM ubuntu:jammy-20260217 as builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
ninja-build \
git \
python3 \
python3-pip \
pkg-config \
libssl-dev \
libcurl4-openssl-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /duckdb
# Copy source code
COPY . .
# Configure and build using Ninja
# Limit extensions to speed up the build for Docker tests
RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_EXTENSIONS=OFF \
&& cmake --build build --config Release
# Install built artifacts into /usr/local
RUN cmake --install build --prefix /usr/local
RUN ldconfig
# Runtime stage
FROM ubuntu:jammy-20260217
ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
ENV DEBIAN_FRONTEND=noninteractive
# Copy installed binaries/libraries from builder
COPY --from=builder /usr/local /usr/local
WORKDIR /duckdb
# Expose a shell by default for debugging; user can run duckdb from /usr/local/bin
CMD ["bash"]
Summary (under 1500 chars):
- Failing step: [builder 5/7] RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_EXTENSIONS=OFF && cmake --build build --config Release
- Exact error message and exit code:
CMake Error at extension/extension_build_tools.cmake:597 (add_subdirectory):
add_subdirectory given source "/duckdb/extension/OFF" which is not an
existing directory.
Call Stack (most recent call first):
CMakeLists.txt:843 (include)
Exit code: 1
- Failing command/step description: The Docker build step invoking cmake for a no-extensions build (BUILD_EXTENSIONS=OFF) failed during CMake configuration due to a missing extension directory.
- Missing packages or files mentioned: The path /duckdb/extension/OFF does not exist (attempted to add_subdirectory for this source). This indicates the OFF extension directory is missing or misnamed.
- Version mismatch / versioning details observed:
- Base image: ubuntu:jammy-20260217
- Git is available but not in a git repository, causing version-detection to fall back to a dummy version:
- Continuing with dummy version v0.0.1
- git hash 0123456789, extension folder v0.0.1
- Extensions initially loaded: OFF, core_functions, parquet, jemalloc, but OFF path is missing, causing the failure during configuration.FROM ubuntu:jammy-20260217 as builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
ninja-build \
git \
python3 \
python3-pip \
pkg-config \
libssl-dev \
libcurl4-openssl-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /duckdb
# Copy source code
COPY . .
# Configure and build using Ninja
# Disable extensions to speed up the build for Docker tests and avoid missing extension dirs
RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_EXTENSIONS="" -DDUCKDB_EXTENSION_CONFIGS="" \
&& cmake --build build --config Release
# Install built artifacts into /usr/local
RUN cmake --install build --prefix /usr/local
RUN ldconfig
# Runtime stage
FROM ubuntu:jammy-20260217
ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
ENV DEBIAN_FRONTEND=noninteractive
# Copy installed binaries/libraries from builder
COPY --from=builder /usr/local /usr/local
WORKDIR /duckdb
# Expose a shell by default for debugging; user can run duckdb from /usr/local/bin
CMD ["bash"]
Build timed out after 600s
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
# Install required build dependencies
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git python3 python3-pip \
pkg-config libssl-dev libcurl4-openssl-dev zlib1g-dev
WORKDIR /duckdb
COPY . .
# Configure, build and install DuckDB from source
RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build --config Release
RUN cmake --install build --prefix /usr/local
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Copy the built artifacts from the builder stage
COPY --from=builder /usr/local /usr/local
# Ensure the dynamic linker can find the installed libraries
RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/duckdb.conf && ldconfig
WORKDIR /
# Expose a minimal, testable command to verify the build
CMD ["/usr/local/bin/duckdb", "--version"]
# Ignore version control and CI related files .git .gitignore .github/ # Ignore build outputs and caches when building locally build/ dist/ .cache/ CMakeFiles/ CMakeCache.txt cmake_install.cmake Makefile *.log *.o *.a *.so *.dll # Ignore other misc *.tmp *.swp
Build timed out after 600s
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
# Install required build dependencies
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git python3 python3-pip \
pkg-config libssl-dev libcurl4-openssl-dev zlib1g-dev
WORKDIR /duckdb
COPY . .
# Configure, build and install DuckDB from source
RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build -j$(nproc) --config Release
RUN cmake --install build --prefix /usr/local
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Create a non-root user for runtime
RUN useradd -m -s /bin/bash duckdb
# Copy the built artifacts from the builder stage
COPY --from=builder /usr/local /usr/local
# Ensure the dynamic linker can find the installed libraries
RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/duckdb.conf && ldconfig
USER duckdb
WORKDIR /
# Expose a minimal, testable command to verify the build
CMD ["/usr/local/bin/duckdb", "--version"]
Build timed out after 600s
# Ignore version control and CI related files .git .gitignore .github/ # Ignore build outputs and caches when building locally build/ dist/ .cache/ CMakeFiles/ CMakeCache.txt cmake_install.cmake Makefile *.log *.o *.a *.so *.dll # Ignore large repo folders not needed for build benchmark/ tools/ docs/ doc/ third_party/ external/ # Misc *.tmp *.swp
Build timed out after 600s
Build timed out after 600s
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
# Install required build dependencies
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git python3 python3-pip \
pkg-config libssl-dev libcurl4-openssl-dev zlib1g-dev
WORKDIR /duckdb
COPY . .
# Configure, build and install DuckDB from source
RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DBUILD_BENCHMARKS=0 \
-DENABLE_SANITIZER=OFF \
-DENABLE_THREAD_SANITIZER=OFF \
-DENABLE_UBSAN=OFF \
-DDUCKDB_EXPLICIT_VERSION="" \
-DDUCKDB_EXPLICIT_PLATFORM=""
RUN cmake --build build -j$(nproc) --config Release
RUN cmake --install build --prefix /usr/local
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Create a non-root user for runtime
RUN useradd -m -s /bin/bash duckdb
# Copy the built artifacts from the builder stage
COPY --from=builder /usr/local /usr/local
# Ensure the dynamic linker can find the installed libraries
RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/duckdb.conf && ldconfig
USER duckdb
WORKDIR /
# Expose a minimal, testable command to verify the build
CMD ["/usr/local/bin/duckdb", "--version"]
Build timed out after 600s
# syntax=docker/dockerfile:1 FROM ubuntu:jammy-20260217 AS builder ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential cmake ninja-build git python3 python3-pip pkg-config \ libssl-dev libcurl4-openssl-dev zlib1g-dev && \ rm -rf /var/lib/apt/lists/* WORKDIR /duckdb COPY . . # Configure and build RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release RUN cmake --build build --config Release # Collect build artifacts for runtime image RUN mkdir -p /duckdb-dist/release && cp -r build/release /duckdb-dist/release FROM ubuntu:jammy-20260217 AS runtime ENV DEBIAN_FRONTEND=noninteractive # Runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ libssl3 libcurl4 zlib1g ca-certificates pkg-config && \ rm -rf /var/lib/apt/lists/* WORKDIR /opt/duckdb COPY --from=builder /duckdb-dist /opt/duckdb-dist RUN groupadd -r duckdb && useradd -r -u 1000 -g duckdb -m duckdb RUN chown -R duckdb:duckdb /opt/duckdb-dist USER duckdb WORKDIR /opt/duckdb-dist CMD ["/opt/duckdb-dist/release/duckdb"] HEALTHCHECK --interval=30s --timeout=10s CMD ["/opt/duckdb-dist/release/duckdb","--version"]
# Exclude various files and folders to keep context small .git .gitignore build/ dist/ .duckdb_cache/ docs/ benchmark/ tests/ scripts/ .idea/ .vscode/ *.log *.tmp *.o *.so *.dll *.dylib "**/__pycache__/**"
Build timed out after 600s
# syntax=docker/dockerfile:1 FROM ubuntu:jammy-20260217 AS builder ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential cmake ninja-build git python3 python3-pip pkg-config \ libssl-dev libcurl4-openssl-dev zlib1g-dev ccache \ && rm -rf /var/lib/apt/lists/* WORKDIR /duckdb COPY . . # Configure and build with cache support and minimal features RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DDUCKDB_BUILD_BENCHMARKS=OFF -DDUCKDB_BUILD_TESTS=OFF -DDUCKDB_BUILD_EXTENSIONS=OFF RUN cmake --build build --config Release # Collect build artifacts for runtime image RUN mkdir -p /duckdb-dist/release && cp -r build/release /duckdb-dist/release FROM ubuntu:jammy-20260217 AS runtime ENV DEBIAN_FRONTEND=noninteractive # Runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ libssl3 libcurl4 zlib1g ca-certificates pkg-config && \ rm -rf /var/lib/apt/lists/* WORKDIR /opt/duckdb COPY --from=builder /duckdb-dist /opt/duckdb-dist RUN groupadd -r duckdb && useradd -r -u 1000 -g duckdb -m duckdb RUN chown -R duckdb:duckdb /opt/duckdb-dist USER duckdb WORKDIR /opt/duckdb-dist CMD ["/opt/duckdb-dist/release/duckdb"] HEALTHCHECK --interval=30s --timeout=10s CMD ["/opt/duckdb-dist/release/duckdb","--version"]
Concerns: Artifact copy step nests the build output under /duckdb-dist/release resulting in /opt/duckdb-dist/release/release/duckdb which does not match the CMD path /opt/duckdb-dist/release/duckdb., CMD and HEALTHCHECK paths assume a binary at /opt/duckdb-dist/release/duckdb but the actual file is at /opt/duckdb-dist/release/release/duckdb., Potential risk that the base image tag ubuntu:jammy-20260217 may not exist in all environments; consider using a stable tag like ubuntu:22.04 or a clearly versioned tag.
# syntax=docker/dockerfile:1 FROM ubuntu:jammy-20260217 AS builder ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential cmake ninja-build git python3 python3-pip pkg-config \ libssl-dev libcurl4-openssl-dev zlib1g-dev ccache \ && rm -rf /var/lib/apt/lists/* WORKDIR /duckdb COPY . . # Configure and build with cache support and minimal features RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DDUCKDB_BUILD_BENCHMARKS=OFF -DDUCKDB_BUILD_TESTS=OFF -DDUCKDB_BUILD_EXTENSIONS=OFF RUN cmake --build build --config Release # Collect build artifacts for runtime image RUN mkdir -p /duckdb-dist/release && cp -r build/release/. /duckdb-dist/release FROM ubuntu:jammy-20260217 AS runtime ENV DEBIAN_FRONTEND=noninteractive # Runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ libssl3 libcurl4 zlib1g ca-certificates pkg-config && \ rm -rf /var/lib/apt/lists/* WORKDIR /opt/duckdb COPY --from=builder /duckdb-dist /opt/duckdb-dist RUN groupadd -r duckdb && useradd -r -u 1000 -g duckdb -m duckdb RUN chown -R duckdb:duckdb /opt/duckdb-dist USER duckdb WORKDIR /opt/duckdb-dist CMD ["/opt/duckdb-dist/release/duckdb"] HEALTHCHECK --interval=30s --timeout=10s CMD ["/opt/duckdb-dist/release/duckdb","--version"]
Build timed out after 600s
# syntax=docker/dockerfile:1 FROM ubuntu:22.04 AS builder ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential cmake ninja-build git python3 python3-pip pkg-config \ libssl-dev libcurl4-openssl-dev zlib1g-dev ccache \ && rm -rf /var/lib/apt/lists/* WORKDIR /duckdb COPY . . # Configure and build with cache support and minimal features RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \ -DDUCKDB_BUILD_BENCHMARKS=OFF -DDUCKDB_BUILD_TESTS=OFF -DDUCKDB_BUILD_EXTENSIONS=OFF RUN cmake --build build --config Release # Collect build artifacts for runtime image RUN mkdir -p /duckdb-dist/release && cp -r build/release/. /duckdb-dist/release FROM ubuntu:22.04 AS runtime ENV DEBIAN_FRONTEND=noninteractive # Runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ libssl3 libcurl4 zlib1g ca-certificates pkg-config && \ rm -rf /var/lib/apt/lists/* WORKDIR /opt/duckdb COPY --from=builder /duckdb-dist /opt/duckdb-dist RUN groupadd -r duckdb && useradd -r -u 1000 -g duckdb -m duckdb RUN chown -R duckdb:duckdb /opt/duckdb-dist USER duckdb WORKDIR /opt/duckdb-dist CMD ["/opt/duckdb-dist/release/duckdb"] HEALTHCHECK --interval=30s --timeout=10s CMD ["/opt/duckdb-dist/release/duckdb","--version"]
Build timed out after 600s
# syntax=docker/dockerfile:1 FROM ubuntu:22.04 AS builder ENV DEBIAN_FRONTEND=noninteractive ENV CMAKE_BUILD_PARALLEL_LEVEL=2 RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential cmake ninja-build git python3 python3-pip pkg-config \ libssl-dev libcurl4-openssl-dev zlib1g-dev ccache \ && rm -rf /var/lib/apt/lists/* WORKDIR /duckdb COPY . . # Configure and build with cache support and minimal features RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \ -DDUCKDB_BUILD_BENCHMARKS=OFF -DDUCKDB_BUILD_TESTS=OFF -DDUCKDB_BUILD_EXTENSIONS=OFF RUN cmake --build build --config Release # Collect build artifacts for runtime image RUN mkdir -p /duckdb-dist/release && cp -r build/release/. /duckdb-dist/release FROM ubuntu:22.04 AS runtime ENV DEBIAN_FRONTEND=noninteractive # Runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ libssl3 libcurl4 zlib1g ca-certificates pkg-config && \ rm -rf /var/lib/apt/lists/* WORKDIR /opt/duckdb COPY --from=builder /duckdb-dist /opt/duckdb-dist RUN groupadd -r duckdb && useradd -r -u 1000 -g duckdb -m duckdb RUN chown -R duckdb:duckdb /opt/duckdb-dist USER duckdb WORKDIR /opt/duckdb-dist CMD ["/opt/duckdb-dist/release/duckdb"] HEALTHCHECK --interval=30s --timeout=10s CMD ["/opt/duckdb-dist/release/duckdb","--version"]
Build timed out after 600s