ENTRYPOINT_TEMPLATE.sh 436 B

1234567891011121314
  1. #!/bin/sh
  2. # Устанавливаем пакеты и настраиваем SSH
  3. ssh-keygen -A
  4. echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
  5. echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
  6. echo "root:root" | chpasswd
  7. echo 'cd /app' >> /root/.bashrc
  8. # Запускаем SSH
  9. /usr/sbin/sshd
  10. # Запускаем команду по умолчанию (чтобы контейнер не завершался)
  11. exec "$@"