问题标签 [azure-acr]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
azure-container-instances - 将映像从 Azure 容器注册表拉入 Azure 容器实例时,如何使用 SystemAssigned 标识?
我想在Azure Container Instances中创建一个容器(或容器组),从Azure Container Registry中提取图像- 但使用SystemAssigned标识。因此,我想避免使用 ACR 登录凭据、服务主体或UserAssigned身份。
当我运行此脚本(PowerShell 中的 Azure CLI) ...
... ACI 似乎没有认识到它应该已经获得 ACR 授权并显示此提示:
Azure CLI 版本:2.14.0
这有意义吗?ACR 是否支持 ACI 托管标识?
azure - 我无法让 AKS 中的 Kubernetes 从 Azure 中的私有 Docker 注册表中提取图像
我已按照此处的说明进行操作https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/service_principal_client_secret
所以,我创建了一个服务主体
这是(恢复的)terraform 脚本
然后我执行了 terraform (使用az ad sp create-for-rbac
命令生成的 ID/秘密)
AKS 已创建,但 Pod 无法拉取映像。这是 pod 中的错误消息。
但是,当我terraform apply
使用我的个人帐户 ( az login
) 运行并且我没有设置环境变量 ARM_CLIENT_ID、ARM_CLIENT_SECRET 等时,它可以工作......
我了解服务主体 TerraformSP(角色贡献者)无法将角色分配AcrPull
给azurerm_kubernetes_cluster.default.kubelet_identity[0].object_id
.
在这种情况下,最佳做法是什么?我应该为 TerraformSP 分配一些管理员角色吗?或者,我是否遗漏了 terraform 脚本中的某些内容?
目标是将此 terraform 脚本放入 Azure DevOps 的管道中。
terraform - Terraform 允许 AKS 使用 ACR
这是我的 Terraform 代码,用于创建 AKS 集群并允许它使用我的 ACR(在同一订阅中):
我收到此错误(状态 = 403 代码 =“授权失败”):
我为我的 AKS 使用了托管标识,而不是主体服务。
谢谢你的帮助 ..
docker - 在主机上登录 ACR,我可以在容器内使用它吗?
我们正在将 Jenkins 设置迁移到 Azure。
拥有 Azure 节点后,我将运行以下命令:
从那里,我可以从注册表中提取图像。
我的容器docker
内部映射了套接字,它与docker
主机交互以启动更多容器。但是当我尝试docker pull
从容器内部时,我得到
解决该问题的一种方法是az
在我的容器中安装并在启动时调用相同的登录。但是我不想修改图像。
是否有其他方法可以使用主机已获得 ACR 授权的事实?主机中是否有任何文件夹可以映射到我的容器中,以便它使用主机的登录信息?
谢谢
azure - 使用 Azure ACR API 列出存储库标记
我正在尝试向其发送 GET 请求,https://acr-name.azurecr.io/v2/image-name/tags/list
但我不确定要使用哪个令牌,因为我不断收到:
我尝试了 BasicAuth 但我仍然收到错误消息。我什至尝试了 Bearer,但它仍然无法正常工作。
我想在我的 ACR 中列出图像的所有标签。
kubernetes - AKS + ACR - Flux 给了我 err="requesting tags: 当我尝试自动部署时
我将 AKS 与 ACR 一起使用,当我指定映像时它工作正常(手动更新部署 .yaml 文件以更新映像版本名称)。
但是当我尝试使用图像标签过滤自动执行此操作时: https ://docs.fluxcd.io/en/latest/references/fluxctl/
使用:
其中补充说:
当我做:
我收到此错误:
知道为什么吗?
django - 如何在不使用 docker-compose.yml 的情况下为多个容器创建单个 Dockerfile?
这里我有2个案例:
案例 1:我创建了一个名为 Django 的项目Counterproj
,它使用了一个名为Sqlite3
. 我已经使用 dockerized 这个项目Dockerfile
并推送到 Azure ACI,它在这两种情况下local
和cloud
.
案例 2:问题从这里开始,当我迁移Sqlite3
到PostgreSQL
我使用Dockerfile
和docker-compose.yml
使用服务对 Django 项目进行 dockerized 时web
,db
这些在我的本地运行良好,但是当我推送到 Azure ACI 时,容器无法相互通信,Counterproj_web:test
并且postgres:test
实例被终止。
在这里,我的查询是,我们能否在不使用任何 docker-compose.yml 的情况下使用 PostgreSQL 作为数据库来创建单个 Dockerfile 进行 Django 项目容器化。如果我们可以创建单个 dockerfile,请建议我应该在本地和云中运行的最佳方式。
下面是我的,Dockerfile
供大家参考。docker-compose.yml
database settings
Dockerfile:
码头工人-compose.yml:
设置.py:
build - az acr 为具有基本映像的私有 docker 注册表构建身份验证
我们在私有 ACR 中有一些基础镜像,我们希望使用来自第一个注册表的基础镜像在其他 ACR 中构建镜像。构建失败并出现身份验证错误。
有没有办法将 az acr build agent 授权给远程 docker 注册表或不同的 ACR?
azure - Azure python SDK deployment docker image
Maybe somebody can help me to solve this issue as I am a bit confused and honestly burning out on this little project.
I have 2 web apps, one is my production
environemnet and the other web app is a staging
, I have a pipeline that build a docker image and push it to the staging for testing, and when I am happy with the output I do a swap to send everything to prod.
Now everything here works fine, but I realise that the docker built version don't match between staging and prod. (staging is one version behind all the time).
So I was looking into azure python sdk to see if I can script the deployment of a specific docker version that I have in my azure acr without any success.
I can list the docker images that I have from the azure-cli, but I cannot find a python sdk library to automate this deployment.
the only bit of code I found it was the following:
but nothing related to deployment of specific docker images to a web app. If anyone can help me to find a python library to achieve this, I would be gratefully.
Thank you so much
kubernetes - 将 ACR 集成到 AKS 的预期方式是什么?
寻找将 ACR 与用于生产环境的 AKS 集成的最佳方法,似乎有多种方法,例如在安装期间和安装后,使用服务主体和使用图像提取密钥等。
所以为我们的生产环境寻找最推荐的选项,这里的要求如下。
- 在创建 aks 期间是否必须附加 acr
- 如果我们将 ACR 与 AKS 安装本身集成在一起,会有什么优势。(似乎,在这种情况下,我们不想将图像拉取秘密传递给 pod 规范以及我们需要的其他选项)
- 在这种情况下,将 ACR 与 AKS ( az aks update) 命令集成的另一种方法是什么?如果是,与我们在 AKS 安装期间集成的先前方法有什么不同。
- 如果我想在另一个区域设置辅助 AKS 集群,但需要连接 ACR 主实例的 ACR 地理复制实例,我该如何完成?在这种情况下,是否必须在 AKS 安装期间附加 tge ACR 或稍后安装后也可以使用?