https://github.com/webyneter/gitlab-ci-docker-runner
Docker image-based GitLab CI Runner
https://github.com/webyneter/gitlab-ci-docker-runner
docker gitlab-ci runner
Last synced: 1 day ago
JSON representation
Docker image-based GitLab CI Runner
- Host: GitHub
- URL: https://github.com/webyneter/gitlab-ci-docker-runner
- Owner: webyneter
- License: mit
- Created: 2018-09-13T19:33:14.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-19T14:19:42.000Z (about 6 years ago)
- Last Synced: 2025-11-08T01:19:11.912Z (8 months ago)
- Topics: docker, gitlab-ci, runner
- Language: Dockerfile
- Homepage:
- Size: 97.7 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitLab CI Docker Runner
Docker-based GitLab CI Runner image.
   
## What's Inside
### Packages
* [Docker](https://hub.docker.com/_/docker/)
* [Docker Compose](https://pypi.org/project/docker-compose/)
* [Ansible](https://pypi.org/project/ansible/)
* [AWS CLI](https://pypi.org/project/awscli/)
These are kept up-to-date on a best-effort basis.
### Executables
* `print_info`: Prints runtime environment info
* `ssh_add_private_key`: `ssh-add`s the runner's private key
### Environment variables expected to be present
[This is how you set GitLab CI secret environment variables](https://docs.gitlab.com/ee/ci/variables/#variables).
* `CI_RUNNER_SSH_PRIVATE_KEY`: an unencrypted private key (as string) which the associated public key has been authorized to access your remote host; required by `ssh_add_private_key`
## Use Cases
### GitLab CI
```yaml
# .gitlab-ci.yml
image: webyneter/gitlab-ci-docker-runner:docker-18.06-dockercompose-1.22.0-ansible-2.6.4-awscli-1.16.14
services:
- docker:dind
stages:
- build
- deploy
.base_before_script: &base_before_script |
print_info
build:
stage: build
before_script:
- *base_before_script
- $(aws --region us-east-2 ecr get-login --no-include-email)
script:
- docker-compose build
- docker-compose push
deploy:
stage: deploy
variables:
ANSIBLE_VAULT_PASSWORD_FILE_NAME: ".vault_password"
before_script:
- *base_before_script
- ssh_add_private_key
script:
- # Deployment script...
```