surrealpatch/docker/Dockerfile.binary

28 lines
687 B
Text
Raw Normal View History

#
# 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"]