From 836ee88883c7b36fbef2d7c26a07f963dbde127e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Sun, 18 Jan 2026 17:04:16 +0100 Subject: [PATCH] Add missing packages and improve shell selection in service script --- Dockerfile | 4 +++- service.ssh.sh | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ecba49c..751582b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/service.ssh.sh b/service.ssh.sh index ba68194..9df76f8 100644 --- a/service.ssh.sh +++ b/service.ssh.sh @@ -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