diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 363b158..8639c18 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 @@ -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 diff --git a/README.md b/README.md index 336134b..33b5a98 100644 --- a/README.md +++ b/README.md @@ -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