Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
claudyus committed Sep 12, 2017
0 parents commit 3441e52
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
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"]
21 changes: 21 additions & 0 deletions README.rst
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
5 changes: 5 additions & 0 deletions config.sh
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)

0 comments on commit 3441e52

Please sign in to comment.