-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (26 loc) · 1.13 KB
/
Dockerfile
File metadata and controls
38 lines (26 loc) · 1.13 KB
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
35
36
37
38
# SPDX-License-Identifier: AGPL-3.0-or-later
# Multi-stage musl-static build for rhizoCrypt service
# Stage 1: Builder (musl-static, ecoBin compliant)
FROM rust:1.87-slim AS builder
RUN rustup target add x86_64-unknown-linux-musl && \
apt-get update && apt-get install -y musl-tools && \
rm -rf /var/lib/apt/lists/*
WORKDIR /build
COPY Cargo.toml Cargo.lock ./
COPY crates/ ./crates/
RUN cargo fetch
RUN cargo build --release --target x86_64-unknown-linux-musl -p rhizocrypt-service
# Stage 2: Minimal runtime (scratch — fully static binary needs no OS)
FROM scratch
COPY --from=builder /build/target/x86_64-unknown-linux-musl/release/rhizocrypt /rhizocrypt
USER 1000:1000
EXPOSE 9400
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD ["/rhizocrypt", "status"]
ENTRYPOINT ["/rhizocrypt"]
CMD ["server"]
LABEL org.opencontainers.image.title="rhizoCrypt"
LABEL org.opencontainers.image.description="Ephemeral DAG engine for ecoPrimals"
LABEL org.opencontainers.image.version="0.14.0-dev"
LABEL org.opencontainers.image.vendor="ecoPrimals Project"
LABEL org.opencontainers.image.licenses="AGPL-3.0-or-later"