diff --git a/Jenkinsfile b/Jenkinsfile index d57f6f9..a9b1277 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,7 @@ pipeline{ steps { // Deploy to remote Docker host sshagent(['ssh_creds']) { - sh "ssh -o StrictHostKeyChecking=no administrator@172.16.11.90 'docker stop --name docker-test-image && docker pull aisthanestha/docker-test-image:latest && docker run -d -p 8082:80 --name docker-test-image:latest'" + sh "ssh-copy-id -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa.pub administrator@172.16.11.90 && ssh -o StrictHostKeyChecking=no administrator@172.16.11.90 'docker stop --name docker-test-image && docker pull aisthanestha/docker-test-image:latest && docker run -d -p 8082:80 --name docker-test-image:latest'" } } }