-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3441e52
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM alpine:latest | ||
|
||
RUN apk add --update openssh-client git && rm -rf /var/cache/apk/* | ||
|
||
COPY config.sh /ssh | ||
|
||
CMD ["ssh-agent"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
dind-ci-push | ||
============== | ||
|
||
A docker image that can be used to (git) push code from docker-in-docker | ||
|
||
Who to use | ||
^^^^^^^^^^^^^^ | ||
You can use this image to push your code from a CI system to a ssh endpoint. | ||
|
||
Here some example, assuming gitlab-ci:: | ||
|
||
deploy_stage: | ||
image: claudyus/dind-ci-push | ||
script: | ||
- /ssh/config.sh # run the config script provided by docker image | ||
- git push -f <some_git_remote> # smooth deploy | ||
|
||
|
||
The configuration script will use the following env variables:: | ||
|
||
* SSH_PRIVATE_KEY: The private ssh key to use |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
eval $(ssh-agent -s) | ||
|
||
ssh-add <(echo $SSH_PRIVATE_KEY) |