Skip to content

JoshKeegan/deploy-ssh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deploy-ssh

A docker image for automated deployments via ssh.
Also adds bash for scripting and curl for quick post-deployment tests.

Usage

Use like any other docker image. It's URL is joshkeegan/deploy-ssh:latest. See Docker Hub for specific version tags.

If connecting to a remote server over SSH (automated), pre-generate SSH keys and put the public one on the user & server you are connecting to.
Then, when you use the image have it use the private key:

echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa

Keep your private keys secure!

  • Pass them through your build pipeline as secure variables.
  • Ensure they are not printed in logs.
  • If anyone else can access the containers, destroy them after use or remove keys from within the container once you are finished using it.

Gitlab CI Example

See PiSearch .gitlab-ci.yml

Publishing

Note: only people authorised to publish to this repo on Docker Hub can publish the image.

  • Log in to Docker Hub (with docker login).
  • Let make handle everything else:
make publish

License

MIT

About

A docker image for automated deployments via SSH

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published