26 lines
647 B
Text
26 lines
647 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="http-compression,storage-tikv"
|
|
|
|
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"]
|