docker-compose up --build -d
docker-compose exec master ssh-keygen -t rsa -b 4096 -C ""
Check a public key and edit JENKINS_SLAVE_SSH_PUBKEY
in docker-compose.yml.
cat jenkins_home/.ssh/id_rsa.pub
vi docker-compose.yml
...
environment:
- JENKINS_SLAVE_SSH_PUBKEY=ssh-rsa AAAAB3NzaC...
...
Check a private key and set it in Jenkins GUI.
cat jenkins_home/.ssh/id_rsa
Alpine image sometimes make problems like NodeJS Plugin. I recommend to use Ubuntu image of default.