Azure – cannot run image from private azure repository

  azure, containers, docker

I have prepared a simple docker image based on java, which should calculate all Fibonacci numbers for given as arguments. dockerfile looks like below

FROM adoptopenjdk/openjdk15:jre-15.0.2_7-alpine
ARG JAR_FILE
ENV JAR_FILE=$JAR_FILE

COPY ${JAR_FILE} app.jar

ENTRYPOINT  [
  "java",
  "-jar",
  "/app.jar"
]

Then I successfully pushed produced image to the azure resource, I can list it when I want to create an azure instance
enter image description here

I also pass as a CMD some args like ["1","5","14"] which for the image should calculate fibo numbers and output them to the stdout. However, when I create & run the image (restart policy – never), after a while, I receive the following error:

{
  "code": "DeploymentFailed",
  "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
  "details": [
    {
      "code": "InaccessibleImage",
      "message": "The image 'matcza2registry.azurecr.io/fibonacci:latest' in container group 'fibo-example' is not accessible. Please check the image and registry credential."
    }
  ]
}

What am I doing wrong, or did not do? Thanks!

Source: Docker Questions

LEAVE A COMMENT