最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

building a docker image and use it directly without push in azure dev ops - Stack Overflow

matteradmin9PV0评论

In a azure pipeline I have two steps:

  • The first step is to build a Docker image (which provides a cross compile environment)

  • Second step is to build

    steps:
        - checkout: self
          clean: true
    
    - task: DockerInstaller@0
      displayName: Docker Installer
      inputs:
        dockerVersion: '17.09.0-ce'
        releaseType: stable
    
    - bash: |
        docker -t my_image -f path/to/Dockerfile .
      displayName: "Build docker image"
    
    - bash: |
        docker run -ti my_image <some_build_command>
      displayName: "Build application"
    

The log output looks like:

Resolving "my_image" using unqualified-search registries (/etc/containers/registries.conf)
Trying to pull docker.io/library/my_image:latest...
Trying to pull quay.io/my_image:latest...
Error: 2 errors occurred while pulling:
 * initializing source docker://my_image:latest: reading manifest latest in docker.io/library/my_image: errors:
denied: requested access to the resource is denied
unauthorized: authentication required

 * initializing source docker://quay.io/my_image:latest: reading manifest latest in quay.io/pm-linux-arm64: StatusCode: 404, <!doctype html>
<html lang=en>
<title>404 Not Foun...

I seems that the worker ignores my docker image. When doing a 'docker images' before build command it outputs my_image as part of the local docker registry

Does anyone has an idea?

In a azure pipeline I have two steps:

  • The first step is to build a Docker image (which provides a cross compile environment)

  • Second step is to build

    steps:
        - checkout: self
          clean: true
    
    - task: DockerInstaller@0
      displayName: Docker Installer
      inputs:
        dockerVersion: '17.09.0-ce'
        releaseType: stable
    
    - bash: |
        docker -t my_image -f path/to/Dockerfile .
      displayName: "Build docker image"
    
    - bash: |
        docker run -ti my_image <some_build_command>
      displayName: "Build application"
    

The log output looks like:

Resolving "my_image" using unqualified-search registries (/etc/containers/registries.conf)
Trying to pull docker.io/library/my_image:latest...
Trying to pull quay.io/my_image:latest...
Error: 2 errors occurred while pulling:
 * initializing source docker://my_image:latest: reading manifest latest in docker.io/library/my_image: errors:
denied: requested access to the resource is denied
unauthorized: authentication required

 * initializing source docker://quay.io/my_image:latest: reading manifest latest in quay.io/pm-linux-arm64: StatusCode: 404, <!doctype html>
<html lang=en>
<title>404 Not Foun...

I seems that the worker ignores my docker image. When doing a 'docker images' before build command it outputs my_image as part of the local docker registry

Does anyone has an idea?

Share Improve this question asked Nov 18, 2024 at 18:15 MarkaRagnos0815MarkaRagnos0815 2104 silver badges15 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

adding "--pull never" in docker run command solved the issue

EDIT: there was a second Problem under the hood. The Docker I am building produces a shell script to run commands using this image. The script is detecting the container-rizer app and selected podman instead of docker. podman did not find the image because it was build using docker .

Post a comment

comment list (0)

  1. No comments so far