RUN echo " IdentityFile ~/.ssh/id_rsa" >> /etc/ssh/ssh_config
# Authorize SSH Host
RUN mkdir -p /root/.ssh && \
chmod 0700 /root/.ssh && \
ssh-keyscan 192.168.10.212 >> /root/.ssh/known_hosts && \
ssh-keyscan 192.168.10.119 >> /root/.ssh/known_hosts
# Add the keys and set permissions
RUN echo "$ssh_prv_key" > ~/.ssh/id_rsa && \
echo "$ssh_pub_key" > ~/.ssh/id_rsa.pub && \
chmod 600 ~/.ssh/id_rsa && \
chmod 600 ~/.ssh/id_rsa.pub
const exec = require('child_process').exec
exec(`du -hs ${path}`, (err, stdout, stderr) => {
if (err) console.log(err);
if (stderr) console.log(stderr);
console.log(stdout)
});