回答:
要使 ACK(Azure Container Registry)忽略 .orig
文件,您需要按照以下步骤操作:
myregistry
。manifest.json
的文件。将以下代码复制并粘贴到 manifest.json
文件的末尾:{
"name": "MyRegistry",
"tagFormat": "v{0}",
"registry": "myregistry",
"repository": "myrepository",
"manifests": [
{
"name": "MyImage",
"version": "1.0.0",
"manifest": {
"name": "MyImage",
"version": "1.0.0",
"description": "My first Docker image",
"tags": [
"myimage:1.0.0"
],
"icons": {},
"scope": "docker-login"
},
"layers": [
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"digest": "sha256:c5a37154321909913b624a0a3621621e245a86755b6244f325ee391089628e36",
"size": 967,
"architecture": "amd64",
"os": "linux"
}
]
}
]
}
.docker/config.json
文件。将以下代码复制并粘贴到 .docker/config.json
文件的末尾:{
"auths": {
"myregistry.azurecr.io": {}
}
}
docker push myregistry.azurecr.io/myrepository:1.0.0
myregistry.azurecr.io
,点击它以查看已创建的镜像。myrepository
标签,然后点击 1.0.0
版本以查看镜像。现在,您已经成功将 Docker 镜像推送到 Azure 容器注册表,并可以在 Kubernetes 集群中使用它。
领取专属 10元无门槛券
手把手带您无忧上云