我在GitLab-CI环境变量中有我的Docker注册表地址。
如何在.gitlab-ci.yml
中的服务命令上下文中使用它?
services:
- name: docker:dind
command: ["--insecure-registry=$CI_REGISTRY"] # this does not work
build:
stage: build
script:
- docker build -t "$CI_REGISTRY_IMAGE" . # this works properly
- docker push "$CI_REGISTRY_IMAGE"