Skip to content

feat: option to start a local docker registry - #1601

Merged
firecow merged 10 commits into
firecow:masterfrom
superewald:docker-registry
Jan 26, 2026
Merged

feat: option to start a local docker registry#1601
firecow merged 10 commits into
firecow:masterfrom
superewald:docker-registry

Conversation

@superewald

@superewald superewald commented Jul 2, 2025

Copy link
Copy Markdown
Contributor

Adds the --registry option to gitlab-ci-local to run a local docker registry. This is useful if jobs build and push docker images using the CI_REGISTRY variable.

implementation

{gclRegistryPrefix} refers to Utils.gclRegistryPrefixand is set toregistry.gcl.local` currently.

  1. starts a local docker registry prior to executing pipelines using registry:2 image if --registry was specified
    1. creates self-signed ssl certificate using alpine/openssl and cache them in {gclRegistryPrefix}.certs volume
    2. runs detached docker registry container configured to use the self-signed ssl certificate within their own network
  2. configure gitlab-ci-local containers to use the local docker registry (as described in "container context")
  3. after pipeline completed, stops and removes the local registry container (but not the network and volumes to avoid recreating the certificate and caching built images)

container context

Using the --registry flag will apply the following modifications to gitlab-ci-local job containers:

  • mount volume with self-signed certificates ({gclRegistryPrefix}.certs, mounted 2 times to support oci and docker cert paths)
  • change $CI_REGISTRY env var to {gclRegistryPrefix} before expanding variables
  • add $CI_REGISTRY_USER={gclRegistryPrefix}.user and $CI_REGISTRY_PASSWORD={gclRegistryPrefix}.pass env variables
  • attach the {gclRegistryPrefix}.net network for communicating with the local registry

Implements #1600

@superewald
superewald marked this pull request as draft July 2, 2025 21:01
@superewald
superewald marked this pull request as ready for review July 7, 2025 12:32
Comment thread src/utils.ts
@mathieufrh

Copy link
Copy Markdown

Any news about this ?

@firecow

firecow commented Jan 19, 2026

Copy link
Copy Markdown
Owner

Feel free to reopen if you get time to finish this PR @superewald

@firecow firecow closed this Jan 19, 2026
@superewald

Copy link
Copy Markdown
Contributor Author

I didn't notice eslint complaining, pushed a fix for that as now the PR is feature-complete. Couldn't re-open the PR though (I'm assuming due to missing permissions), @firecow could you please re-open and merge when checks passed?

@firecow firecow reopened this Jan 20, 2026
@superewald

Copy link
Copy Markdown
Contributor Author

@firecow pr is ready for merge

@firecow
firecow merged commit 085946c into firecow:master Jan 26, 2026
9 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Feb 18, 2026
This MR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Adoption](https://docs.renovatebot.com/merge-confidence/) | [Passing](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
| [npm:gitlab-ci-local](https://github.com/firecow/gitlab-ci-local) | `4.64.1` → `4.65.1` | ![age](https://developer.mend.io/api/mc/badges/age/npm/gitlab-ci-local/4.65.1?slim=true) | ![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/gitlab-ci-local/4.65.1?slim=true) | ![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/gitlab-ci-local/4.64.1/4.65.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/gitlab-ci-local/4.64.1/4.65.1?slim=true) |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>firecow/gitlab-ci-local (npm:gitlab-ci-local)</summary>

### [`v4.65.1`](https://github.com/firecow/gitlab-ci-local/releases/tag/4.65.1)

[Compare Source](firecow/gitlab-ci-local@4.65.0...4.65.1)

Fix automatic publishing

**Full Changelog**: <firecow/gitlab-ci-local@4.65.0...4.65.1>

### [`v4.65.0`](https://github.com/firecow/gitlab-ci-local/releases/tag/4.65.0)

[Compare Source](firecow/gitlab-ci-local@4.64.1...4.65.0)

#### What's Changed

- Major upgrade camelcase, p-map and terminal-link by [@&#8203;firecow](https://github.com/firecow) in [#&#8203;1714](firecow/gitlab-ci-local#1714)
- Major upgrade chalk and start using chalk-template by [@&#8203;firecow](https://github.com/firecow) in [#&#8203;1715](firecow/gitlab-ci-local#1715)
- fix: parsing of regex in rules:if clause by [@&#8203;ANGkeith](https://github.com/ANGkeith) in [#&#8203;1712](firecow/gitlab-ci-local#1712)
- Major upgrade globby by [@&#8203;firecow](https://github.com/firecow) in [#&#8203;1716](firecow/gitlab-ci-local#1716)
- Major upgrade jest by [@&#8203;firecow](https://github.com/firecow) in [#&#8203;1717](firecow/gitlab-ci-local#1717)
- build(deps): bump qs and express in /examples/docker-compose-nodejs by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1722](firecow/gitlab-ci-local#1722)
- chore(deps): lock file maintenance all non-major by [@&#8203;renovate](https://github.com/renovate)\[bot] in [#&#8203;1719](firecow/gitlab-ci-local#1719)
- chore(deps): lock file maintenance by [@&#8203;renovate](https://github.com/renovate)\[bot] in [#&#8203;1730](firecow/gitlab-ci-local#1730)
- build(deps-dev): bump tar from 7.5.3 to 7.5.6 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1731](firecow/gitlab-ci-local#1731)
- build(deps-dev): bump lodash from 4.17.21 to 4.17.23 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1732](firecow/gitlab-ci-local#1732)
- feat: option to start a local docker registry by [@&#8203;superewald](https://github.com/superewald) in [#&#8203;1601](firecow/gitlab-ci-local#1601)
- chore(deps): lock file maintenance all non-major by [@&#8203;renovate](https://github.com/renovate)\[bot] in [#&#8203;1733](firecow/gitlab-ci-local#1733)
- Fix environment-scoped variables with matrix jobs by [@&#8203;chonchiog](https://github.com/chonchiog) in [#&#8203;1726](firecow/gitlab-ci-local#1726)
- Fix flaky extra-host test by [@&#8203;firecow](https://github.com/firecow) in [#&#8203;1741](firecow/gitlab-ci-local#1741)
- feat: support needs specified inside rules by [@&#8203;firecow](https://github.com/firecow) in [#&#8203;1743](firecow/gitlab-ci-local#1743)
- build(deps-dev): bump symfony/process from 5.4.46 to 5.4.51 in /examples/docker-swarm-php by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1735](firecow/gitlab-ci-local#1735)
- chore(deps): lock file maintenance all non-major by [@&#8203;renovate](https://github.com/renovate)\[bot] in [#&#8203;1737](firecow/gitlab-ci-local#1737)
- Fix flaky services and dependency-proxy tests by [@&#8203;firecow](https://github.com/firecow) in [#&#8203;1747](firecow/gitlab-ci-local#1747)
- chore(deps): update all non-major by [@&#8203;renovate](https://github.com/renovate)\[bot] in [#&#8203;1746](firecow/gitlab-ci-local#1746)
- Support GitLab ANSI section markers by [@&#8203;firecow](https://github.com/firecow) in [#&#8203;1740](firecow/gitlab-ci-local#1740)
- Add automated release workflow by [@&#8203;firecow](https://github.com/firecow) in [#&#8203;1748](firecow/gitlab-ci-local#1748)
- Fix rclone R2 config and simplify release workflow by [@&#8203;firecow](https://github.com/firecow) in [#&#8203;1749](firecow/gitlab-ci-local#1749)

#### New Contributors

- [@&#8203;chonchiog](https://github.com/chonchiog) made their first contribution in [#&#8203;1726](firecow/gitlab-ci-local#1726)

**Full Changelog**: <firecow/gitlab-ci-local@4.64.1...4.65.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOS4yIiwidXBkYXRlZEluVmVyIjoiNDMuMTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
kevingerman pushed a commit to kevingerman/gitlab-ci-local that referenced this pull request Apr 10, 2026
* feat: option to start local docker registry

* fix linting errors

* fix already exist check for container errors

* run oci test container in privileged mode

* fix $CI_REGISTRY[..] variable scopes

* add wait-for-port check

* fix eslint

* fix eslint

* fix(tests): use nocolor stream comparison
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants