azure - I can´t pull image from azure ACR
问题描述
This is my first time using azure, I made a Pipeline in DevOps that creates images from dockerfile and pushes them to my ACR. Then I created a multi-container web app use docker-compose and connected my ACR to the web app. But the web app can't pull the images from the ACR. I don't know what I am doing wrong.
I am getting errors when I try to pull images from ACR in multi container web app.
Errors:
2019-11-28 19:27:46.755 INFO - Pulling image: [registry-name].azurecr.io/server
2019-11-28 19:27:46.921 ERROR - DockerApiException: Docker API responded with status code=NotFound, response={"message":"manifest for [registry-name].azurecr.io/server:latest not found: manifest unknown: manifest unknown"}
Docker-compose config:
version: "3"
services:
# SERVER CONTAINER
server:
image: [registry-name].azurecr.io/server
expose:
- 4000
ports:
- 4000:4000
command: node src/server.js
restart: always
# CLIENT CONTAINER
client:
image: [registry-name].azurecr.io/client
ports:
- "80:80"
- "443:443"
links:
- server
depends_on:
- server
restart: unless-stopped
解决方案
First of all, the error shows that it cannot find the [registry-name].azurecr.io/server image with latest tag. So if your image does exist, then the problem is the tag.
If you do not add the tag for your image, it will pull the latest tag in default generally. The logs show like this:
But add a special tag for the image is better than no tag. If you want to get the latest image from the ACR, then always add the latest tag when push the image, do the same when you use that image.
推荐阅读
- javascript - 在前端 javascript 函数中使用 Scriptlet 代码
- discord - 如何在 discord.js 中停止循环
- javascript - TypeError: jquery__WEBPACK_IMPORTED_MODULE_7___default(...)(...).dropdown 不是函数 - reactjs 下拉菜单
- html - 我是 CSS 新手,如何改进此代码
- rust - 当 PartialOrd 更细微并返回 Option 时,为什么 PartialEq 返回一个布尔值
? - nosql - 用于数值字段的 DynamoDB GSI 与 LSI
- binance - 从我通过 Brownie 部署到 BSC 的测试智能合约中移除资金
- vue.js - 如何渲染自定义组件
引导 Vue?(Vue.js 2) - flutter - 使用 GoogleFonts textTheme 时出现 Flutter !_needsLayout 错误
- http - 当状态为 301 且没有 Location 标头时,HTTP 客户端不返回响应