-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (19 loc) · 759 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (19 loc) · 759 Bytes
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
# ==============================================================================
# TapirusDB Multi-Arch Container Image
# Multi-stage build producing an ultra-lightweight < 15MB container
# ==============================================================================
# Stage 1: Build binary and shared library
FROM rust:alpine AS builder
RUN apk add --no-cache musl-dev gcc git
WORKDIR /app
COPY . .
RUN cargo build --release --bin tapirus
# Stage 2: Minimal runtime image
FROM alpine:3.20
RUN apk add --no-cache libgcc
WORKDIR /data
COPY --from=builder /app/target/release/tapirus /usr/local/bin/tapirus
COPY --from=builder /app/include/tapirus.h /usr/local/include/tapirus.h
VOLUME ["/data"]
ENTRYPOINT ["/usr/local/bin/tapirus"]
CMD ["--help"]