Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/morkid/docker-ssh-client
SSH Client for docker
https://github.com/morkid/docker-ssh-client
Last synced: 15 days ago
JSON representation
SSH Client for docker
- Host: GitHub
- URL: https://github.com/morkid/docker-ssh-client
- Owner: morkid
- Created: 2020-06-28T10:28:29.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-28T10:46:07.000Z (over 4 years ago)
- Last Synced: 2024-10-19T16:49:33.179Z (2 months ago)
- Language: Dockerfile
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SSH Client for docker
Small and Simple docker image for ssh client.
## Running container
```bash
docker run --rm -it \
-v $PWD/client.key:/root/.ssh/id_rsa:ro \
morkid/ssh-client ssh [email protected] "free -m"
```## docker-compose Example
```yml
version: '3.7'
services:
memory_check:
image: morkid/ssh-client
volumes:
- ./client.key:/root/.ssh/id_rsa:ro
command: "watch -n 60 ssh [email protected] 'free -m'"
```## Gitlab CI Example
```yml
stages:
- "Deploy"release:
stage: Deploy
image: morkid/ssh-client
script:
- echo "$SSH_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
- ssh -p $SSH_PORT $SSH_USER@$SSH_SERVER "mkdir -p /opt/app"
- scp -P $SSH_PORT -r build/* $SSH_USER@$SSH_SERVER:/opt/app/
only:
refs:
- master
```