Add missing packages and improve shell selection in service script
This commit is contained in:
parent
cb5562272c
commit
836ee88883
2 changed files with 17 additions and 1 deletions
|
|
@ -14,7 +14,9 @@ RUN apk update && apk upgrade && apk add --no-cache \
|
||||||
nano \
|
nano \
|
||||||
tmux \
|
tmux \
|
||||||
openssh-server \
|
openssh-server \
|
||||||
iproute2
|
iproute2 \
|
||||||
|
shadow \
|
||||||
|
procps
|
||||||
|
|
||||||
# Download ttyd
|
# Download ttyd
|
||||||
RUN wget -O /usr/local/bin/ttyd https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.x86_64 && chmod +x /usr/local/bin/ttyd
|
RUN wget -O /usr/local/bin/ttyd https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.x86_64 && chmod +x /usr/local/bin/ttyd
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,20 @@ X11Forwarding no
|
||||||
Subsystem sftp internal-sftp" > /etc/ssh/sshd_config
|
Subsystem sftp internal-sftp" > /etc/ssh/sshd_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$SET_SHELL" ]; then
|
||||||
|
SET_SHELL="/bin/bash"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$SET_SHELL" = "zsh" ]; then
|
||||||
|
SET_SHELL="/bin/zsh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$SET_SHELL" = "fish" ]; then
|
||||||
|
SET_SHELL="/usr/bin/fish"
|
||||||
|
fi
|
||||||
|
|
||||||
|
chsh -s $SET_SHELL
|
||||||
|
|
||||||
# Cloud image generates this file which prevents sshd from accepting passwords
|
# Cloud image generates this file which prevents sshd from accepting passwords
|
||||||
rm -f /etc/ssh/sshd_config.d/50-cloud-init.conf
|
rm -f /etc/ssh/sshd_config.d/50-cloud-init.conf
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue