diff --git a/Dockerfile b/Dockerfile index 49035d7..df05a49 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,5 +8,4 @@ RUN tar xvfz gotty_linux_amd64.tar.gz ENV TERM=xterm COPY run.sh ./run.sh RUN chmod +x ./run.sh -RUN tmux new-session -d -A -s netdiscover netdiscover ENTRYPOINT ["/run.sh"] diff --git a/docker-compose.yml b/docker-compose.yml index 4f4ccdb..1648e90 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,3 +10,4 @@ services: # - port=1234 # - userpass=user:pass # - title=1234 +# - passive=true diff --git a/run.sh b/run.sh index 8690954..05ca0d0 100644 --- a/run.sh +++ b/run.sh @@ -9,5 +9,8 @@ fi if [[ -z "$title" ]];then title=netdiscover-docker fi +if [[ "$passive" == "true" ]];then + passivearg="-p" +fi -./gotty -p "$port" $creds --title-format "$title" tmux new-session -A -s netdiscover netdiscover +./gotty -p "$port" $creds --title-format "$title" tmux new-session -A -s netdiscover netdiscover $passivearg