I have an application running properly with docker-compose up
. That application connects using SSH to my host machine and executes some commands. Right now I provide the SSH credentials by writing them in the source code like this:
const pass = 'mypassword';
let username = 'myusername';
let host = '172.17.0.1';
I 'm trying to follow this guide in order to provide the credentials in a better way. I cannot understand how this line works privateKey: require('fs').readFileSync('/here/is/my/key')
Is it a relative path, is the "key" a file with the password as plain text? Is there something I should provide from my host machine? How can I give the credentials in a docker container?