Skip to content

Commit

Permalink
[TASK] Add info for self-hosted runners
Browse files Browse the repository at this point in the history
  • Loading branch information
ochorocho committed Jul 8, 2024
1 parent 8c0f756 commit c1dc985
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
stages:
- ddev-stage

ddev-initialize:
stage: project-template-test
stage: ddev-stage
image: ghcr.io/ochorocho/ddev-gitlab-ci:v1.23
variables:
# Remove "umask 0000" usage, so DDEV has permissions on the cloned repository
Expand All @@ -9,5 +12,7 @@ ddev-initialize:
- name: docker:dind
when: always
script:
# Fix for: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /builds/*/*'
- ddev config global --no-bind-mounts=true
- ddev --version
# ... do things
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
# DDEV GitLab CI - Docker in Docker (dind)

This image is most likely to be used within the GitLab Runner.
As of now it only tested it on gitlab.com
As of now it is only tested on gitlab.com

**GitLab CI example**: [.gitlab-ci.yml](.gitlab-ci.yml)

## Configuration for self-hosted GitLab Runners

:warning: This (section) information is "work in progress"

```toml
# ...

[[runners]]
# ...
[runners.docker]
# ...
# Could be a security issues: https://docs.gitlab.com/runner/security/#usage-of-docker-executor
privileged = true
volumes = ["gitlab-shared-cache:/cache", "/var/run/docker.sock:/var/run/docker.sock"]
# Add additional groups the container process will run as.
# See https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersdocker-section
group_add = ["999"]
```

# Workflow - Image build

Build the image
Expand Down

0 comments on commit c1dc985

Please sign in to comment.