Files
bitnet-s9pk/docker_entrypoint.sh
2026-05-12 22:31:18 +00:00

18 lines
424 B
Bash
Executable File

#!/bin/bash
set -e
# Setup SSH authorized keys from environment variable
if [ -n "$SSH_AUTHORIZED_KEYS" ]; then
echo "$SSH_AUTHORIZED_KEYS" > /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
echo "SSH authorized keys configured"
fi
# Generate host keys if they don't exist
if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
ssh-keygen -A
fi
# Execute the command passed to the container
exec "$@"