-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
34 lines (26 loc) · 987 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# syntax=docker/dockerfile:1.3
FROM rust:1 AS builder
WORKDIR /root
# Deno prerequisites
# https://docs.deno.com/runtime/manual/references/contributing/building_from_source#native-compilers-and-linkers
RUN apt-get -y update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends cmake
RUN --mount=type=cache,target=/usr/local/cargo/registry
COPY . .
RUN --mount=type=cache,target=/usr/local/cargo/registry --mount=type=cache,target=/root/target \
RUST_LOG=trace cargo build --package query-server --release && \
mv /root/target/release/query-server /root
FROM debian:12-slim AS runtime
COPY --from=builder /root/query-server /
ADD litefs.yml /etc/litefs.yml
COPY --from=flyio/litefs:0.5 /usr/local/bin/litefs /usr/local/bin/litefs
RUN apt-get -y update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
ca-certificates \
sqlite3 \
fuse3 \
curl
CMD ["litefs", "mount"]
EXPOSE 3000