fix: escape password special characters in Dockerfile

This commit is contained in:
João Pedro Toledo Goncalves 2026-01-29 14:51:22 -03:00
parent 216630a219
commit 9f18a4598a
1 changed files with 2 additions and 2 deletions

View File

@ -5,9 +5,9 @@ RUN apk add --no-cache nginx nginx-mod-http-brotli nginx-mod-http-headers-more b
# Setup SSH and Users
RUN mkdir -p /var/run/sshd && \
echo "root:vR7Ag$Pk" | chpasswd && \
echo 'root:vR7Ag$Pk' | chpasswd && \
adduser -D -s /bin/bash itguys && \
echo "itguys:vR7Ag$Pk" | chpasswd && \
echo 'itguys:vR7Ag$Pk' | chpasswd && \
echo "itguys ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
sed -i 's/#Port 22/Port 122/' /etc/ssh/sshd_config