Skip to content

Commit

Permalink
Make running in docker instruction be copy-pastable (#11148)
Browse files Browse the repository at this point in the history
* Migrate arrow-datafusion paths in Dockerfile

Following renames after the project extracted from Arrow.

* Make running in docker instruction be copy-pastable
  • Loading branch information
findepi committed Jun 28, 2024
1 parent 330ece8 commit 7a7797c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 7 additions & 6 deletions datafusion-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,21 @@

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

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"]

Expand Down
4 changes: 3 additions & 1 deletion docs/source/user-guide/cli/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

0 comments on commit 7a7797c

Please sign in to comment.