Marshall Tigerus
Marshall Tigerus

Reputation: 3764

Azure Devops - Docker Compose Build Image Not Found

I am having an issue getting an image to build in Azure Devops from a docker-compose file.

It appears that the first issue is that the image does not build.
enter image description here

This is, I believe, causing the push step to fail, as there is no created image, it is just running an existing image.

enter image description here

What can I do to "force" the process to build an image off of this to pass into our repo? Here is our current docker compose file version: '3.4'

services:
  rabbit:
      image: rabbitmq:3.6.16-management
      labels:
        NAME: "rabbit"
      environment:
        - "RabbitMq/Host=localhost"
      ports:
        - "15672:15672"
        - "5672:5672"
      container_name: rabbit
      restart: on-failure:5

Here's the build and push steps (truncating the top which doesn't really matter) Build: enter image description here Push: enter image description here

Upvotes: 4

Views: 486

Answers (1)

meshtron
meshtron

Reputation: 1224

I spent a fair amount of time fighting with this today (similar issue, anyway). I do not believe the image being non-local is necessarily your problem.

Looks like you are using the "Docker Compose" Task in Azure DevOps for your Build. I had the same problem - I could get it to build fine, but couldn't ever seem to "pipe" the result to the Push Task. I suspect one could add another Task between them to resolve this, but there is an easier way.

Instead, trying using the "Docker" Task to do your build. Without really changing anything else, I was able to make that work and the "Push" step next in line was happy as could be. Docker Task

Upvotes: 3

Related Questions