Skip to content

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
koarlchen committed Dec 29, 2024
1 parent f5ebc54 commit 35b9564
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM rust:slim-bookworm as builder
WORKDIR /usr/src/k4status
ENV TARGET x86_64-unknown-linux-musl
RUN apt-get update &&\
apt-get --no-install-recommends -y install musl-tools &&\
rustup target add "$TARGET"
COPY . .
RUN cargo install --target "$TARGET" --path .

FROM scratch
COPY --from=builder /usr/local/cargo/bin/k4status /
EXPOSE 3000
CMD ["./k4status"]

0 comments on commit 35b9564

Please sign in to comment.