-
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (23 loc) · 715 Bytes
/
Dockerfile
File metadata and controls
24 lines (23 loc) · 715 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
FROM rust:1.89.0-alpine3.21 AS builder
WORKDIR /app
RUN apk update
RUN apk add --no-cache musl-dev bash git
COPY . .
RUN cargo build --locked --release -p systeroid
RUN cargo build --locked --release --no-default-features -p systeroid-tui
RUN mkdir -p build-out/
RUN ["/bin/bash", "-c", "cp target/release/systeroid{,-tui} build-out/"]
RUN ["/bin/bash", "-c", "strip build-out/systeroid{,-tui}"]
RUN ["/bin/bash", "-c", "scripts/clone-linux-docs.sh"]
FROM scratch
WORKDIR /app
COPY --from=builder \
/app/build-out/systeroid \
/app/build-out/systeroid-tui \
/usr/local/bin/
COPY --from=builder \
/app/linux-docs \
/usr/share/doc/linux-docs
USER 1000:1000
ENV NO_CACHE=1
ENTRYPOINT ["systeroid"]