[英]How to deploy a Docker container to Azure App Service from GitLab container registry
I have an application hosted on GitLab and have set the GitLab CI to build my docker image and push it into GitLab Container registry. I have an application hosted on GitLab and have set the GitLab CI to build my docker image and push it into GitLab Container registry. Now I want to deploy that container image into Azure App Service without using Azure Container Registry (I don't want to have another registry).现在我想将该容器映像部署到 Azure 应用服务中,而不使用 Azure 容器注册表(我不想拥有另一个注册表)。 Is this possible and how?这可能吗?如何?
Thanks谢谢
EDIT:编辑:
I tried like this and it's not working.我试过这样,但它不工作。
With this error:出现此错误:
2020-05-27T14:31:32.739Z INFO - Pulling image: project1_administration:latest
2020-05-27T14:31:33.098Z ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"Get https://registry-1.docker.io/v2/library/project1_administration/manifests/latest: unauthorized: incorrect username or password"}
2020-05-27T14:31:33.099Z ERROR - Pulling docker image project1_administration:latest failed:
2020-05-27T14:31:33.100Z INFO - Pulling image from Docker hub: library/project1_administration:latest
2020-05-27T14:31:33.577Z ERROR - DockerApiException: Docker API responded with status code=NotFound, response={"message":"pull access denied for project1_administration, repository does not exist or may require 'docker login': denied: requested access to the resource is denied"}
2020-05-27T14:31:33.580Z ERROR - Image pull failed: Verify docker image configuration and credentials (if using private repository)
2020-05-27T14:31:33.586Z INFO - Stopping site project1test because it failed during startup.
The username and password I used works when I connect to gitlab site.当我连接到 gitlab 站点时,我使用的用户名和密码有效。 It seems it is trying to use Docker hub to pull the image not the GitLab.似乎它正在尝试使用 Docker 集线器来拉取图像,而不是 GitLab。
Assuming that your imaage is already in the Container Registry in GitLab:假设您的镜像已经在 GitLab 的 Container Registry 中:
read_registry
scope.确保令牌具有read_registry
scope。https://registry.gitlab.com
服务器URL: https://registry.gitlab.com
registry.gitlab.com/<username>/<repo>:latest
图片和标签: registry.gitlab.com/<username>/<repo>:latest
/<repo>:latest
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.