Unlock lamp account and disable password login

This commit is contained in:
Deon George 2023-07-26 21:34:07 +10:00
parent 5ea2bc5e49
commit 9759591ddd
1 changed files with 3 additions and 2 deletions

View File

@ -10,9 +10,10 @@ ENV SSH_KEY_PATH=/etc/ssh/keys
# Base
RUN apk add --no-cache bash git unzip openssh
RUN sed -i -e "s:#HostKey\ /etc/ssh:HostKey ${SSH_KEY_PATH}:" /etc/ssh/sshd_config
RUN sed -i -e "s:#HostKey\ /etc/ssh:HostKey ${SSH_KEY_PATH}:" -e "s:#PasswordAuthentication yes:PasswordAuthentication no:" /etc/ssh/sshd_config
RUN adduser -g "Hosting Admin User" -u 1000 -G www-data -h /home/lamp -HD lamp
RUN adduser -g "Hosting Admin User" -u 1000 -G www-data -h /home/lamp -HD lamp\
&& echo "lamp:*" | chpasswd -e
# DB Clients
RUN apk add --no-cache mariadb-client postgresql-client