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 \
|
||||
tmux \
|
||||
openssh-server \
|
||||
iproute2
|
||||
iproute2 \
|
||||
shadow \
|
||||
procps
|
||||
|
||||
# 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
|
||||
|
|
|
|||
|
|
@ -12,6 +12,20 @@ X11Forwarding no
|
|||
Subsystem sftp internal-sftp" > /etc/ssh/sshd_config
|
||||
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
|
||||
rm -f /etc/ssh/sshd_config.d/50-cloud-init.conf
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue