mirror of
https://github.com/byReqz/gotty-docker.git
synced 2024-11-24 16:34:56 +00:00
add Debian variant
This commit is contained in:
parent
3700652e51
commit
f25dab2d79
11
Debian/Dockerfile
Normal file
11
Debian/Dockerfile
Normal file
@ -0,0 +1,11 @@
|
||||
FROM debian:sid
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y curl jq 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 tar xvfz gotty_linux_amd64.tar.gz
|
||||
|
||||
ENV TERM=xterm
|
||||
COPY run-deb.sh ./run.sh
|
||||
RUN chmod +x ./run.sh
|
||||
ENTRYPOINT ["/run.sh"]
|
23
Debian/run-deb.sh
Normal file
23
Debian/run-deb.sh
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$port" ];then
|
||||
port=8080
|
||||
fi
|
||||
if [ -n "$userpass" ];then
|
||||
creds="-c "$userpass""
|
||||
fi
|
||||
if [ -z "$title" ];then
|
||||
title=gotty
|
||||
fi
|
||||
if [ -n "$pkgs" ];then
|
||||
apt-get update
|
||||
apt-get install $pkgs
|
||||
fi
|
||||
if [ -z "$command" ];then
|
||||
apt-get update
|
||||
apt-get install figlet
|
||||
command="curl -s https://raw.githubusercontent.com/dylanaraps/pfetch/master/pfetch | bash && figlet no command set && read swag"
|
||||
fi
|
||||
|
||||
/gotty -p "$port" $creds --title-format "$title" tmux new-session -A -s "$title" "$command"
|
||||
|
Loading…
Reference in New Issue
Block a user