init
This commit is contained in:
commit
5e8318e55e
24
.gitlab-ci.yml
Normal file
24
.gitlab-ci.yml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
stages:
|
||||||
|
- build
|
||||||
|
|
||||||
|
|
||||||
|
image: docker:latest
|
||||||
|
|
||||||
|
services:
|
||||||
|
- name: docker:dind
|
||||||
|
entrypoint: ["env", "-u", "DOCKER_HOST"]
|
||||||
|
command: ["dockerd-entrypoint.sh"]
|
||||||
|
variables:
|
||||||
|
DOCKER_HOST: tcp://docker:2375/
|
||||||
|
DOCKER_DRIVER: overlay2
|
||||||
|
# See https://github.com/docker-library/docker/pull/166
|
||||||
|
DOCKER_TLS_CERTDIR: ""
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: build
|
||||||
|
tags:
|
||||||
|
- dind
|
||||||
|
script:
|
||||||
|
- docker build --no-cache -t luki42/ssh:latest .
|
||||||
|
- docker login -p $DockerPWD -u luki42
|
||||||
|
- docker push luki42/ssh:latest
|
2
Dockerfile
Normal file
2
Dockerfile
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
FROM alpine:3.7
|
||||||
|
RUN apk add --no-cache openssh-client
|
24
README.md
Normal file
24
README.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# 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"
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user