Initial BitNet s9pk package with SSH access
This commit is contained in:
17
docker_entrypoint.sh
Executable file
17
docker_entrypoint.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/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 "$@"
|
||||
Reference in New Issue
Block a user