Code Monkey home page Code Monkey logo

Comments (4)

dsantanu avatar dsantanu commented on September 23, 2024

I know it's abit late and you probably have solved the issue as well, but for others, all the post-processors block, should reside inside a post-processors {} (at least for the OP's case) to be applied sequentially, like this:

post-processors {
  post-processor "docker-tag" {
    repository = "${var.container_registry}/my-base-image"
    tags       = [local.container_tag]
  }

  post-processor "docker-push" {
    login              = true
    login_server   = var.container_registry
    login_username = var.container_registry_username
    login_password = var.container_registry_password
  }
}

otherwise, the tag no found error will occure.

from packer-plugin-docker.

dk-ebeisecker avatar dk-ebeisecker commented on September 23, 2024

I know it's abit late and you probably have solved the issue as well, but for others, all the post-processors block, should reside inside a post-processors {} (at least for the OP's case) to be applied sequentially, like this:

post-processors {
  post-processor "docker-tag" {
    repository = "${var.container_registry}/my-base-image"
    tags       = [local.container_tag]
  }

  post-processor "docker-push" {
    login              = true
    login_server   = var.container_registry
    login_username = var.container_registry_username
    login_password = var.container_registry_password
  }
}

otherwise, the tag no found error will occure.

This Packer documentation seems to indicate that putting each post-processor in a post-processors block isn't necessary?

from packer-plugin-docker.

dsantanu avatar dsantanu commented on September 23, 2024

from my experience, when running docker-push post-processor, things are probably a bit diffrent (compare to docker-export), where it will try to push right after the build, without having a tag and will fail eventually - that's what my understanding. Without clubing together tag and push within a post-processors block, I always end up with no-tag-found error.

from packer-plugin-docker.

EvanBolt avatar EvanBolt commented on September 23, 2024

I still have trouble when trying to push multiple images to Artifactory via the docker-push post-processor, with the error:

Pushing: <my_registry><my_image>:<container tag>
The push refers to repository [<my_registry><my_image>]
An image does not exist locally with the tag: <my_registry><my_image>

The image name matches, however it seems like somewhere it's thinking the image name is the tag.

I also am logged in to the Artifactory instance, and I'm able to push with the docker push command.

from packer-plugin-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.