From 2d7e156b2078f28563556cc4f86d8317942f15c2 Mon Sep 17 00:00:00 2001 From: Vincent Emonet Date: Mon, 6 Dec 2021 23:19:33 +0100 Subject: [PATCH] Fixed the Dockefile (dependencies and default command), and put it in the root folder to be able to build from the local oxigraph crate. --- Dockerfile | 21 +++++++++++++++++++++ server/Dockerfile | 11 ----------- 2 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 Dockerfile delete mode 100644 server/Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..bc468b05 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM rust:1-buster as builder + +RUN apt-get update && \ + apt-get install -y libclang-dev clang + +COPY . /oxigraph +WORKDIR /oxigraph/server +RUN cargo build --release + + +FROM debian:buster-slim +LABEL org.opencontainers.image.source="https://github.com/oxigraph/oxigraph" + +RUN apt-get update && \ + apt-get install -y ca-certificates && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=builder /oxigraph/target/release/oxigraph_server /usr/local/bin/oxigraph_server + +ENTRYPOINT [ "/usr/local/bin/oxigraph_server" ] +CMD [ "--location", "/data", "serve", "--bind", "0.0.0.0:7878" ] diff --git a/server/Dockerfile b/server/Dockerfile deleted file mode 100644 index 4a635278..00000000 --- a/server/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM rust:1-buster as builder - -COPY . /oxigraph -RUN cd /oxigraph/server && cargo build --release - -FROM debian:buster-slim - -RUN apt-get update && apt-get install ca-certificates -y && rm -rf /var/lib/apt/lists/* -COPY --from=builder /oxigraph/target/release/oxigraph_server /usr/local/bin/oxigraph_server - -ENTRYPOINT [ "/usr/local/bin/oxigraph_server" ]