diff --git a/README.md b/README.md index b6f1b8f..15371d2 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Collection of Dockerfiles created to build & pack various tools. - [1. How to use](#1-how-to-use) - [1.1. CLI](#11-cli) - [2. Tools](#2-tools) + - [2.1. Bandwhich](#21-bandwhich)
@@ -43,4 +44,16 @@ Variable | Description | Default # 2. Tools -Nothing yet +## 2.1. Bandwhich + +### 2.1.1. Source +>This is a CLI utility for displaying current network utilization by process, connection and remote IP/hostname + +https://github.com/imsnif/bandwhich + +
+ +### 2.1.2. Example +``` +docker run -it --net host bandwhich -i eth0 +``` diff --git a/tools/bandwhich/Dockerfile b/tools/bandwhich/Dockerfile new file mode 100644 index 0000000..04a16f4 --- /dev/null +++ b/tools/bandwhich/Dockerfile @@ -0,0 +1,22 @@ +# ---- Base ---- +FROM alpine:3 AS base +WORKDIR /app + + +# ---- Build ---- +FROM rust:alpine AS build +WORKDIR /build +# Install packages +RUN apk add --no-cache make libc-dev build-base +# Copy sources +ADD .build/repository/ . +# Update dependencies and Compile +RUN cargo update && TARGET="release" make + + +# ---- Release ---- +FROM base AS release +# Copy build-target +COPY --from=build /build/target/release/bandwhich . + +ENTRYPOINT ["./bandwhich"] diff --git a/tools/bandwhich/info.env b/tools/bandwhich/info.env new file mode 100644 index 0000000..51a3a79 --- /dev/null +++ b/tools/bandwhich/info.env @@ -0,0 +1 @@ +GIT_REPOSITORY=https://github.com/imsnif/bandwhich