portainer / portainer

Making Docker and Kubernetes management easy.
https://www.portainer.io
zlib License
31.2k stars 2.49k forks source link

Portainer fails too early if it does not find an image, ignoring build #12406

Open stavros-k opened 1 week ago

stavros-k commented 1 week ago

Before you start please confirm the following.

Problem Description

  preview-my-app-api:
    image: my-image:build-18
    build:
      context: .
      tags:
        - my-image:build-18

This was working on prior portainer versions, but now portainer fails with "No such image"

Expected Behavior

Continue to build if an image is not found.

Actual Behavior

Fails to deploy with "No such image". Leaving the stack empty.

Steps to Reproduce

Try to deploy a stack with a build that was never done on that host before.

Portainer logs or screenshots

Failed to deploy a stack: compose up operation failed: Error response from daemon: No such image: my-image:build-18

Portainer version

2.24.0

Portainer Edition

Business Edition (BE/EE) with 5NF / 3NF license

Platform and Version

Docker

OS and Architecture

Ubuntu 22.04 x64

Browser

Firefox

What command did you use to deploy Portainer?

docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-be:2,.24.0

Additional Information

No response

jamescarppe commented 6 days ago

Can you confirm the last version you saw this working on? How are you deploying this stack (and the associated build artifacts)?

stavros-k commented 6 days ago

it was working up to 2.23.0, I'm using GitOps

docker-compose.yaml and Dockerfile on at the root of the repository. The gist of the compose is the one shared, the rest is env vars and labels.

Nothing else.

jamescarppe commented 5 days ago

Thanks for the additional detail - I was able to reproduce this locally. I've opened an internal issue to get this fixed.

Internal Ref: BE-11448