From 7a7797c891057c783680bade813d4ba2a49344b7 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Fri, 28 Jun 2024 22:15:42 +0200 Subject: [PATCH] Make running in docker instruction be copy-pastable (#11148) * Migrate arrow-datafusion paths in Dockerfile Following renames after the project extracted from Arrow. * Make running in docker instruction be copy-pastable --- datafusion-cli/Dockerfile | 13 +++++++------ docs/source/user-guide/cli/installation.md | 4 +++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/datafusion-cli/Dockerfile b/datafusion-cli/Dockerfile index c8132afbf613..d231da62a2fd 100644 --- a/datafusion-cli/Dockerfile +++ b/datafusion-cli/Dockerfile @@ -17,12 +17,11 @@ FROM rust:1.78-bookworm as builder -COPY . /usr/src/arrow-datafusion -COPY ./datafusion /usr/src/arrow-datafusion/datafusion +COPY . /usr/src/datafusion +COPY ./datafusion /usr/src/datafusion/datafusion +COPY ./datafusion-cli /usr/src/datafusion/datafusion-cli -COPY ./datafusion-cli /usr/src/arrow-datafusion/datafusion-cli - -WORKDIR /usr/src/arrow-datafusion/datafusion-cli +WORKDIR /usr/src/datafusion/datafusion-cli RUN rustup component add rustfmt @@ -30,7 +29,9 @@ RUN cargo build --release FROM debian:bookworm-slim -COPY --from=builder /usr/src/arrow-datafusion/datafusion-cli/target/release/datafusion-cli /usr/local/bin +COPY --from=builder /usr/src/datafusion/datafusion-cli/target/release/datafusion-cli /usr/local/bin + +RUN mkdir /data ENTRYPOINT ["datafusion-cli"] diff --git a/docs/source/user-guide/cli/installation.md b/docs/source/user-guide/cli/installation.md index f5114cafe54a..a3dc4bd2bdb4 100644 --- a/docs/source/user-guide/cli/installation.md +++ b/docs/source/user-guide/cli/installation.md @@ -57,6 +57,8 @@ this to work. ```bash git clone https://github.com/apache/datafusion cd datafusion +# Note: the build can take a while docker build -f datafusion-cli/Dockerfile . --tag datafusion-cli -docker run -it -v $(your_data_location):/data datafusion-cli +# You can also bind persistent storage with `-v /path/to/data:/data` +docker run --rm -it datafusion-cli ```