Fork of https://github.com/oxigraph/oxigraph.git for the purpose of NextGraph project
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
1.1 KiB
26 lines
1.1 KiB
1 year ago
|
FROM --platform=$BUILDPLATFORM rust:1-bullseye as builder
|
||
|
ARG BUILDARCH TARGETARCH
|
||
3 years ago
|
RUN apt-get update && \
|
||
1 year ago
|
apt-get install -y libclang-dev clang && \
|
||
|
if [ "$BUILDARCH" != "$TARGETARCH" ] && [ "$TARGETARCH" = "arm64" ] ; \
|
||
|
then \
|
||
|
apt-get install -y g++-aarch64-linux-gnu && \
|
||
|
rustup target add aarch64-unknown-linux-gnu ; \
|
||
|
fi
|
||
3 years ago
|
COPY . /oxigraph
|
||
1 year ago
|
WORKDIR /oxigraph/cli
|
||
1 year ago
|
RUN if [ "$BUILDARCH" != "$TARGETARCH" ] && [ "$TARGETARCH" = "arm64" ] ; \
|
||
|
then \
|
||
|
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc && \
|
||
|
export BINDGEN_EXTRA_CLANG_ARGS="--sysroot /usr/aarch64-linux-gnu" && \
|
||
|
cargo build --release --target aarch64-unknown-linux-gnu && \
|
||
1 year ago
|
mv /oxigraph/target/aarch64-unknown-linux-gnu/release/oxigraph /oxigraph/target/release/oxigraph ; \
|
||
1 year ago
|
else \
|
||
|
cargo build --release ; \
|
||
|
fi
|
||
3 years ago
|
|
||
1 year ago
|
FROM --platform=$TARGETPLATFORM gcr.io/distroless/cc-debian11
|
||
1 year ago
|
COPY --from=builder /oxigraph/target/release/oxigraph /usr/local/bin/oxigraph
|
||
|
ENTRYPOINT [ "/usr/local/bin/oxigraph" ]
|
||
2 years ago
|
CMD [ "serve", "--location", "/data", "--bind", "0.0.0.0:7878" ]
|