This container image is to execute command on remote host by ssh.
In example, trigger script on remote host when build completely.
Add following step on cloudbuild.yaml
steps:
- name: 'tkuni83/ssh-command-dispatcher:1.0.0'
args: ['echo', 'this command is executed on remote host.']
env:
- USER=${_USER}
- HOST=${_HOST}
- PRIVATE_KEY=${_PRIVATE_KEY}
Add variables on trigger edit page in cloud build.

Note: value of PRIVATE_KEY is need to replace LF to \n because variables of cloud build is can't include LF.
cat xxx.pem | tr '\n' '_' | sed 's/_/\\n/g'
git clone ssh://[email protected]/t-kuni/ssh-command-dispatcher
cd ssh-command-dispatcher
docker-compose build
cp .env.example .env
vi .env
docker-compose run app
Content type
Image
Digest
Size
4.7 MB
Last updated
about 6 years ago
docker pull tkuni83/ssh-command-dispatcher