[英]How can I push docker compose based images for Gitlab Registry Using CI/CD
I've linked Postgres DB & API images using docker-compose, its working in local, I've to push both image for gitlab registry Using CI/CD.我已经使用 docker-compose 链接了 Postgres DB 和 API 图像,它在本地工作,我必须使用 CI/CD 为 gitlab 注册表推送这两个图像。
The gitlab docs cover how to build and push Docker images during CI quite well. gitlab 文档涵盖了如何在 CI 期间很好地构建和推送 Docker 图像。
It is important to note/use the CI_REGISTRY_IMAGE
variable.注意/使用CI_REGISTRY_IMAGE
变量很重要。 If the image name you try to push is different from CI_REGISTRY_IMAGE
, the push will fail.如果您尝试推送的图像名称与CI_REGISTRY_IMAGE
不同,则推送将失败。 If you want to have multiple images, you either need to label them in the tag ( $CI_REGISTRY_IMAGE:db-$CI_COMMIT_REF_SLUG
) or create a separate repo and manage the images there.如果你想要多个图像,你要么需要在标签中 label 它们( $CI_REGISTRY_IMAGE:db-$CI_COMMIT_REF_SLUG
),要么创建一个单独的 repo 并在那里管理图像。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.