Fix the new base image to support helm cli ssh login
[pti/o2.git] / charts / resources / scripts / init / o2_helmcli_start.sh
index 135882d..c0bd9de 100644 (file)
 
 #!/bin/bash
 
-apt-get update && apt-get install ssh -y
+apk add --no-cache openssh
 
 if [ -z "${HELM_USER_PASSWD}" ];
 then
     HELM_USER_PASSWD=St8rlingX*
 fi
-useradd helm
-passwd helm << EOF
+
+adduser helm << EOF
 ${HELM_USER_PASSWD}
 ${HELM_USER_PASSWD}
 EOF
 
-service ssh restart
-
-tail -f /dev/null
\ No newline at end of file
+ssh-keygen -A
+exec /usr/sbin/sshd -D -e "$@"
\ No newline at end of file