custom-dockerfile/dev-env/start.sh
2024-10-06 20:38:42 +08:00

14 lines
251 B
Bash

#!/bin/bash
if [ -z "$SSH_PASSWORD" ]; then
echo "Error: SSH_PASSWORD is not set. Please provide a password."
exit 1
fi
echo "root:$SSH_PASSWORD" | chpasswd
echo "SSH password for root is set to: $SSH_PASSWORD"
service ssh start
exec "$@"