2023-12-05 11:52:09 +00:00
|
|
|
#
|
|
|
|
# Dockerfile that builds the SurrealDB Linux binary and makes it depend on GLIBC 2.17.
|
|
|
|
#
|
|
|
|
|
2023-12-11 13:24:18 +00:00
|
|
|
FROM docker.io/ubuntu:20.04
|
2023-12-05 11:52:09 +00:00
|
|
|
|
2023-12-15 21:53:25 +00:00
|
|
|
ARG CARGO_EXTRA_FEATURES="storage-tikv"
|
|
|
|
ARG SURREAL_BUILD_METADATA=""
|
2023-12-05 11:52:09 +00:00
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update && apt-get install -y curl patch clang gpg build-essential git
|
|
|
|
|
|
|
|
# Install rust
|
|
|
|
COPY docker/files/rustup-init.sh /tmp/rustup-init.sh
|
|
|
|
RUN /tmp/rustup-init.sh -y
|
|
|
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
|
|
|
|
|
|
|
RUN mkdir /surrealdb
|
|
|
|
WORKDIR /surrealdb
|
|
|
|
COPY . /surrealdb/
|
|
|
|
|
|
|
|
RUN cargo build --features ${CARGO_EXTRA_FEATURES} --release --locked
|
|
|
|
|
|
|
|
# For testing purposes
|
|
|
|
RUN cp target/release/surreal /surreal
|
|
|
|
|
|
|
|
ENTRYPOINT ["/surreal"]
|