surrealpatch/docker/Dockerfile.binary
2024-01-05 19:07:17 +00:00

27 lines
687 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 --default-toolchain 1.74.1
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"]