When running a docker:dind service I realized that the --extra-host arguments passed to gitlab-ci-local get passed to the running image, but not to the services, which broke the resolution for my finagled $CI_REGISTRY_IMAGE in the docker in docker container (since the registry was resolved in the service container when using docker buildx build --push).
Since the services already get the same volumes as the main container, I think it makes sense to pass the extra-host args as well. What do you think? I don't know how controversial this change is, so if you think this is a bad idea, feel free to close the PR 😅 .
When running a
docker:dind
service I realized that the--extra-host
arguments passed togitlab-ci-local
get passed to the running image, but not to the services, which broke the resolution for my finagled$CI_REGISTRY_IMAGE
in the docker in docker container (since the registry was resolved in the service container when usingdocker buildx build --push
).Since the services already get the same volumes as the main container, I think it makes sense to pass the
extra-host
args as well. What do you think? I don't know how controversial this change is, so if you think this is a bad idea, feel free to close the PR 😅 .P.S. Is the test fine like this? I mostly cobbled it together by combining the existing
add-host <test-job>
test with theservices <multie-job>
test.