surrealpatch/docker/Dockerfile.binary
2023-12-15 21:53:25 +00:00

27 lines
660 B
Text

#
# Dockerfile that builds the SurrealDB Linux binary and makes it depend on GLIBC 2.17.
#
FROM docker.io/ubuntu:20.04
ARG CARGO_EXTRA_FEATURES="storage-tikv"
ARG SURREAL_BUILD_METADATA=""
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"]