From 940a9c1209544934266d0f1ed7abd09c69a9ae2b Mon Sep 17 00:00:00 2001 From: Nils Date: Sat, 29 May 2021 18:18:29 +0200 Subject: [PATCH] initial release --- Dockerfile | 10 ++++++++++ docker-compose.yml | 12 ++++++++++++ run.sh | 12 ++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 run.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3ba3fea --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM debian:sid + +RUN apt-get update +RUN apt-get install -y curl jq netdiscover +RUN curl -s https://api.github.com/repos/yudai/gotty/releases/latest | jq -r '.assets[].browser_download_url' | grep "gotty_linux_amd64.tar.gz" | xargs curl -L -o gotty_linux_amd64.tar.gz +RUN tar xvfz gotty_linux_amd64.tar.gz + +COPY run.sh ./run.sh +RUN chmod +x ./run.sh +ENTRYPOINT ["/run.sh"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4f4ccdb --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: '2.3' + +services: + netdiscover-docker: + container_name: netdiscover-docker + network_mode: host + image: byreqz/netdiscover-docker:latest + restart: unless-stopped +# environment: +# - port=1234 +# - userpass=user:pass +# - title=1234 diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..3f10441 --- /dev/null +++ b/run.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +if [[ -z "$port" ]];then + port=8080 +fi +if [[ -n "$userpass" ]];then + creds="-c "$userpass"" +fi +if [[ -z "$title" ]];then + title=netdiscover-docker +fi +./gotty -p "$port" $creds --title-format "$title" netdiscover