-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
making 1. dockerfile 2. action can build image into ghcr 3. fixing code coverage issue 4. adding dependency bot to check action
- Loading branch information
Showing
5 changed files
with
85 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "findora-exporter" | ||
version = "1.1.0" | ||
version = "1.1.1" | ||
authors = ["tommady <[email protected]>"] | ||
edition = "2021" | ||
readme = "README.md" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM docker.io/rust:slim AS builder | ||
|
||
RUN apt-get update -y && apt-get install -y musl-tools | ||
ARG TARGETPLATFORM | ||
RUN case "$TARGETPLATFORM" in \ | ||
"linux/amd64") echo x86_64-unknown-linux-musl > /rust_targets ;; \ | ||
*) exit 1 ;; \ | ||
esac | ||
|
||
RUN rustup target add $(cat /rust_targets) | ||
|
||
COPY . ./exporter | ||
WORKDIR /exporter | ||
RUN cargo build --release --target $(cat /rust_targets) | ||
RUN cp target/$(cat /rust_targets)/release/findora-exporter ./ | ||
RUN strip --strip-all ./findora-exporter | ||
|
||
FROM docker.io/busybox:latest | ||
|
||
COPY --from=builder /exporter/findora-exporter /exporter | ||
|
||
EXPOSE 9090 | ||
ENTRYPOINT ["/exporter", "--config", "/config.json"] |