Skip to content

Commit

Permalink
new Dockerfile for cd
Browse files Browse the repository at this point in the history
  • Loading branch information
krystianity committed May 13, 2023
1 parent bda2b69 commit ccbe235
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "ilagent"
version = "0.4.0"
version = "0.4.3"
authors = ["Chris Froehlingsdorf <[email protected]>"]
edition = "2021"

[dependencies]
log = "0.4"
env_logger = "0.9"
env_logger = "0.10"
actix-web = "4.3"
serde = "1.0"
serde_json = "1.0"
Expand Down
18 changes: 8 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
FROM ekidd/rust-musl-builder:1.57.0 AS builder
ADD . ./
RUN sudo chown -R rust:rust /home/rust/src
RUN cargo build --release
RUN strip /home/rust/src/target/x86_64-unknown-linux-musl/release/ilagent
FROM rust:1.69-bullseye as builder
WORKDIR /usr/src/ilagent
COPY . .
RUN cargo install --path .

FROM alpine:3.13.6 AS runner
COPY --from=builder /home/rust/src/target/x86_64-unknown-linux-musl/release/ilagent \
/ilagent

ENTRYPOINT ["./ilagent"]
FROM debian:bullseye-slim
RUN apt-get update && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/cargo/bin/ilagent /usr/local/bin/ilagent
ENTRYPOINT ["ilagent"]
11 changes: 11 additions & 0 deletions Dockerfile.musl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM ekidd/rust-musl-builder:1.57.0 AS builder
ADD . ./
RUN sudo chown -R rust:rust /home/rust/src
RUN cargo build --release
RUN strip /home/rust/src/target/x86_64-unknown-linux-musl/release/ilagent

FROM alpine:3.13.6 AS runner
COPY --from=builder /home/rust/src/target/x86_64-unknown-linux-musl/release/ilagent \
/ilagent

ENTRYPOINT ["./ilagent"]
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@

The ilert Agent 🦀 📦 is a program that lets you easily integrate your on premise system with ilert.

<sup>Super small footprint (20MB container, that consumes about 5MB! of RAM)</sup>

## iLert agent

The iLert agent comes in a single binary and helps you to
The iLert agent comes in a single binary with a tiny footprint and helps you to

* Send events from the command line `ilagent event -k il1insada3872867c63 -t ALERT -s 'a summary from the shell'`
* Send heartbeat pings from the command line `ilagent heartbeat -k il1insada3872867c63`
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn main() -> () {

let matches = App::new("ilert Agent")

.version("0.4.0")
.version("0.4.3")
.author("iLert GmbH. <[email protected]>")
.about("The ilert Agent 🦀 📦 lets you easily integrate your on premise system with ilert.")

Expand Down

0 comments on commit ccbe235

Please sign in to comment.