mirror of
https://github.com/orhun/systeroid
synced 2024-11-05 13:44:36 +00:00
24 lines
715 B
Docker
24 lines
715 B
Docker
FROM rust:1.66.1-alpine3.17 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"]
|