Skip to content

sourceboat/deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sourceboat/deploy

Docker Build Status Release Docker Pulls Image Size MicroBadger Layers

Docker image to run remote commands via SSH.

Usage

Known hosts

To add your host to the known hosts of the SSH agent, simply add the content to the environment variable $SSH_KNOWN_HOSTS. To get the the public key for your host, you can use ssh-keyscan

$ ssh-keyscan -p <port> <ip-or-hostname>

Put the output of the command into the $SSH_KNOWN_HOSTS environment variable.

SSH Private Key

To add your SSH private key, add the content of your private key to the environment variable $SSH_PRIVATE_KEY.

Example

To use this image via GitLab CI add the following to the .gitlab-ci.yml:

deploy:
  stage: deploy
  image: sourceboat/deploy:latest
  script:
    - ssh $HOST <your command>

Make sure, the environment variable $SSH_KNOWN_HOSTS and/or $SSH_PRIVATE_KEY are set in your project settings.

Changelog

Check releases for all notable changes.

Credits

License

The MIT License (MIT). Please see License File for more information.