Is your feature request related to a problem? Please describe.
I have several projects that build containers within the gitlab ci workflow. Some of them use the gitlab registry (in particular the $CI_REGISTRY, $CI_REGISTRY_USER and $CI_REGISTRY_PASSWORD variables) to push and pull specific layers to implement some kind of "caching".
Describe the solution you'd like
A cli option for gitlab-ci-local which will start a local docker registry and populate the $CI_REGISTRY variable to all gitlab-ci-local managed containers.
For eg. gitlab-ci-local --registry would
- start a https://hub.docker.com/_/registry container
- add an override for
$CI_REGISTRY variable for other containers
- execute gitlab-ci-local main logic/pipelines
- stop the registry container before exiting
Describe alternatives you've considered
As described in the docker-in-docker-build-with-local-registry example, it is currently required to start and stop a local docker registry manually. That is inconvenient as gitlab-ci-local should not require additional setup commands to run for cases which are supported by the original gitlab-runners in my opinion.
Also it makes scripting with gitlab-ci-local a bit more verbose and adds a source of failure.
Additional Context
I'm using buildah and podman but the same scenario should apply to docker afaik.
Is your feature request related to a problem? Please describe.
I have several projects that build containers within the gitlab ci workflow. Some of them use the gitlab registry (in particular the
$CI_REGISTRY,$CI_REGISTRY_USERand$CI_REGISTRY_PASSWORDvariables) to push and pull specific layers to implement some kind of "caching".Describe the solution you'd like
A cli option for gitlab-ci-local which will start a local docker registry and populate the
$CI_REGISTRYvariable to all gitlab-ci-local managed containers.For eg.
gitlab-ci-local --registrywould$CI_REGISTRYvariable for other containersDescribe alternatives you've considered
As described in the docker-in-docker-build-with-local-registry example, it is currently required to start and stop a local docker registry manually. That is inconvenient as gitlab-ci-local should not require additional setup commands to run for cases which are supported by the original gitlab-runners in my opinion.
Also it makes scripting with gitlab-ci-local a bit more verbose and adds a source of failure.
Additional Context
I'm using buildah and podman but the same scenario should apply to docker afaik.