From 3cb55a90c92f533999f655a0d287151c07c2b907 Mon Sep 17 00:00:00 2001 From: Ludovic Muller Date: Mon, 23 Feb 2026 19:00:46 +0100 Subject: [PATCH] feat: add `sophia-cli` as `sop` --- .changeset/fancy-news-thank.md | 5 +++++ Dockerfile | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .changeset/fancy-news-thank.md diff --git a/.changeset/fancy-news-thank.md b/.changeset/fancy-news-thank.md new file mode 100644 index 0000000..85ae825 --- /dev/null +++ b/.changeset/fancy-news-thank.md @@ -0,0 +1,5 @@ +--- +"docker-node-java-jena": minor +--- + +Add `sophia-cli` as `sop` diff --git a/Dockerfile b/Dockerfile index ff1b93f..439f6ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,19 @@ +ARG SOPHIA_CLI_VERSION="2cf13ac19e4f1e61b502267a2f6381e84993d1b1" + +FROM rust:bookworm AS sophia-cli-builder + +WORKDIR /app + +ARG SOPHIA_CLI_VERSION + +# Fetch source code of sophia-cli, in order to build it and have it available in the final image +RUN git init \ + && git remote add origin https://github.com/pchampin/sophia-cli.git \ + && git fetch --depth 1 origin "${SOPHIA_CLI_VERSION}" \ + && git checkout FETCH_HEAD \ + && rm -rf .git +RUN cargo build --release + FROM docker.io/library/node:24-trixie-slim ENV DEBIAN_FRONTEND="noninteractive" @@ -12,6 +28,9 @@ RUN apt-get update \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +# Add sophia-cli to the image +COPY --from=sophia-cli-builder /app/target/release/sop /usr/bin/sop + # Install Minio client COPY --from=minio/mc:latest /usr/bin/mc /usr/bin/mc