Run the CLI in a service
Use this guide to run the CLI in a container or as a child process. For package selection and runtime requirements, see Installation.
Run in a container
The CLI container packages the same standalone binary with its runtime libraries
and CA certificates. Copy the index digest from a completed
GitHub Release's CLI
section and replace RELEASE_INDEX_HASH below. Docker selects the matching
architecture from the index:
dar_image='ghcr.io/mag1cfrog/delta-arrow-reader@sha256:RELEASE_INDEX_HASH'
docker run --rm --read-only "$dar_image" --version
docker run --rm --read-only \
--mount type=bind,src=/absolute/path/to/table,dst=/table,readonly \
"$dar_image" inspect /table --view summary
docker run --rm --read-only \
--mount type=bind,src=/absolute/path/to/table,dst=/table,readonly \
"$dar_image" scan --column id --limit 100 /table > sample.arrow
The image runs dar directly as UID/GID 65532:65532. Omitting arguments prints
help. Each invocation exits when the command finishes; the image does not run a
Reader server. Mounted files and their parent directories must be readable by that user.
Supply storage credentials and configuration at runtime. Keep HTTPS certificate
verification enabled and provide a readable custom trust bundle when required
by your storage endpoint. See HTTPS configuration.
When dar is the container's PID 1, SIGINT and SIGTERM stop it with exit status
130 and 143, respectively. Once cancellation is handled, the CLI does not write
an IPC end marker. An output write already in progress can still leave bytes on
stdout. Discard that output when the command exits unsuccessfully.
Call the CLI from a Go service
A Go service can invoke the binary with exec.CommandContext and decode stdout
with the official Arrow Go streaming IPC reader. Pass each CLI argument
separately, drain stderr separately, and require both successful IPC decoding and
a zero child exit status. An early stop or decoding failure must cancel, close,
and reap the child before returning.
The runnable Go example
includes bounded stderr capture, cancellation tests, and a consumer Dockerfile.
Its COPY --from stages copy /usr/local/bin/dar and /usr/share/doc/dar/ from
an explicit CLI image into a Debian 12 service image. The service still needs
glibc 2.36 or newer, the binary manifest's shared libraries, and CA certificates.
Copying the executable alone does not support Alpine or scratch. The Go
application needs no cgo or Rust toolchain at runtime.