24 lines
622 B
Markdown
24 lines
622 B
Markdown
# Docker SSH image
|
|
|
|
Updated on a weekly basis.
|
|
|
|
## Example Gitlab job:
|
|
|
|
```
|
|
Test_Deploy:
|
|
stage: deploy
|
|
image: luki42/ssh:latest
|
|
needs:
|
|
- Frontend_Tests
|
|
- Backend_Tests
|
|
- Debian_Server
|
|
only:
|
|
- master
|
|
script:
|
|
- eval $(ssh-agent -s)
|
|
- ssh-add <(echo "$SSH_PRIVATE_KEY")
|
|
- mkdir -p ~/.ssh
|
|
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
|
- scp deb/Testpackage.deb root@192.168.0.42:/tmp/
|
|
- ssh root@192.168.0.42 "DEBIAN_FRONTEND=noninteractive apt-get --reinstall -y -qq install /tmp/Testpackage.deb && rm /tmp/Testpackage.deb"
|
|
``` |