changed startup and daemonized tmux

This commit is contained in:
Nils 2021-05-29 20:26:21 +02:00
parent 812ea6c447
commit 76359ecbb8
Signed by: byreqz
GPG Key ID: 396A62D7D436749E
2 changed files with 5 additions and 2 deletions

View File

@ -1,10 +1,12 @@
FROM debian:sid FROM debian:sid
RUN apt-get update RUN apt-get update
RUN apt-get install -y curl jq netdiscover RUN apt-get install -y curl jq netdiscover tmux
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 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 RUN tar xvfz gotty_linux_amd64.tar.gz
ENV TERM=xterm
COPY run.sh ./run.sh COPY run.sh ./run.sh
RUN chmod +x ./run.sh RUN chmod +x ./run.sh
RUN tmux new-session -d -A -s netdiscover netdiscover
ENTRYPOINT ["/run.sh"] ENTRYPOINT ["/run.sh"]

3
run.sh
View File

@ -9,4 +9,5 @@ fi
if [[ -z "$title" ]];then if [[ -z "$title" ]];then
title=netdiscover-docker title=netdiscover-docker
fi fi
./gotty -p "$port" $creds --title-format "$title" netdiscover
./gotty -p "$port" $creds --title-format "$title" tmux new-session -A -s netdiscover netdiscover