0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2025-07-26 17:04:38 +00:00
Files
libsql/libsql-server/Dockerfile

28 lines
702 B
Docker
Raw Normal View History

2022-12-30 19:09:47 +01:00
# install dependencies
FROM rust:slim-bullseye AS compiler
RUN apt update && apt install -y libclang-dev clang \
build-essential tcl protobuf-compiler file
2022-12-30 19:09:47 +01:00
RUN cargo install cargo-chef
2023-01-05 13:22:28 +02:00
WORKDIR /sqld
2022-12-30 19:09:47 +01:00
# prepare recipe
FROM compiler AS planner
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
2023-01-05 13:22:28 +02:00
# build sqld
2022-12-30 19:09:47 +01:00
FROM compiler AS builder
2023-01-05 13:22:28 +02:00
COPY --from=planner sqld/recipe.json recipe.json
2022-12-30 19:09:47 +01:00
RUN cargo chef cook --release --recipe-path recipe.json
COPY . .
2023-01-06 12:18:02 +01:00
RUN cargo build --release -p sqld
2022-12-30 19:09:47 +01:00
# runtime
FROM debian:bullseye-slim
2023-01-05 13:22:28 +02:00
COPY --from=builder /sqld/target/release/sqld /bin/sqld
COPY docker-entrypoint.sh /usr/local/bin
ENTRYPOINT ["docker-entrypoint.sh"]
2023-01-14 15:18:14 +02:00
EXPOSE 5001 5432 8080
2023-01-03 22:29:55 +02:00
CMD ["/bin/sqld"]