- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我目前正在测试 Azure,并尝试部署我自己的 docker 镜像。该镜像托管在我的虚拟服务器上的注册表中。注册表使用端口 5000。当我尝试为 .yaml 文件提供正确的 imageRegistryCredentials 时,它失败了。
Image registry credentials:
- server: my.server.com:5000
username: me
password: abc123
az container create -g 我的组 --file myconainer.yaml 返回:
The server 'my.server.com:5000' in the 'imageRegistryCredentials' of container group 'MyContainerGroup' is Invalid.
It should be a valid hostname without protocol.
如果我不提供端口,我将无法登录注册表。我做错了什么?
最佳答案
当你从私有(private)容器注册表创建Azure容器实例时,那么容器注册表应该可以从Internet访问,至少Azure可以访问它,而不仅仅是可以从私有(private)网络访问。
如果没有,我建议你可以将你的图片推送到 Azure Container Registry ,然后从中创建 Azure 容器实例。它也是一个私有(private)注册表。它有很棒的access control 。
如果您还有其他问题,请告诉我。我很高兴提供更多帮助。
更新
imageRegistryCredentials
属性的定义在Azure Template中,在yaml文件中也是同样的意思。它不需要端口,只需要服务器名称。如果添加端口,我可以重新出现您遇到的错误。
尝试仅添加不带端口的注册表服务器名称,如下所示:
apiVersion: 2018-10-01
location: eastus
name: azureContainerGroup
properties:
containers:
- name: aci-tutorial-app
properties:
image: charlesacr.azurecr.io/nginx:v1
resources:
requests:
cpu: 1
memoryInGb: 1.5
ports:
- port: 80
osType: Linux
ipAddress:
type: Public
ports:
- protocol: tcp
port: '80'
imageRegistryCredentials:
- server: charlesacr.azurecr.io
username: charlesACR
password: xxxxxxxxxx
tags: null
type: Microsoft.ContainerInstance/containerGroups
更新2
最后通过测试,发现Azure容器实例目前不支持带证书的私有(private)registry,只支持带用户名和密码的私有(private)registry。也许将来会支持,但现在不行。所以如果你想使用私有(private)注册表,那么你需要删除证书authenticate。
您随时可以通过此链接提出反馈: https://feedback.azure.com/forums/602224-azure-container-instances .
关于azure - 配置 Azure ContainerInstance 以使用自托管注册表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55540305/
我目前正在测试 Azure,并尝试部署我自己的 docker 镜像。该镜像托管在我的虚拟服务器上的注册表中。注册表使用端口 5000。当我尝试为 .yaml 文件提供正确的 imageRegistry
我目前正在测试 Azure,并尝试部署我自己的 docker 镜像。该镜像托管在我的虚拟服务器上的注册表中。注册表使用端口 5000。当我尝试为 .yaml 文件提供正确的 imageRegistry
我正在使用 Azure 云。我想将容器日志推送到 Azure loganalytics。但在对现有的 Azure 运行容器执行此操作之前,我想尝试一下 https://learn.microsoft.
我是一名优秀的程序员,十分优秀!