hashicorp / packer-plugin-docker

Packer plugin for Docker Builder
https://www.packer.io/docs/builders/docker
Mozilla Public License 2.0
31 stars 25 forks source link

Release 1.0.2 docker-push/tag post processors throwing errors #77

Closed jjs105 closed 2 years ago

jjs105 commented 2 years ago

Overview of the Issue

After the update from 1.0.1 to 1.0.2 running packer templates which use the docker-push/tag post-processors throw the following error:

Error determining pushed Docker image digest

This seems to be generated by newly added code in the push/tag processors. Although the same/similar code used to be in the pull step code.

Also note that in the pull step it notifies the user that the digest information may not be available until the image has been pushed.

Final note: Although an error is generated the build does not fail and the end result is as expected.

Reproduction Steps

Simply run packer against the tutorial code at https://learn.hashicorp.com/tutorials/packer/docker-get-started-post-processors?in=packer/docker-get-started

Plugin and Packer version

v1.7.5

Simplified Packer Buildfile

https://gist.github.com/jjs105/751935fe509c2026ac943d4420e39e62

Operating system and Environment details

Running on Alpine via Docker

Log Fragments and crash.log files

https://gist.github.com/jjs105/d63efd5b14c53377668d0b25fa48e681

nywilken commented 2 years ago

Thanks for bubbling this up @jjs105. This should really be a warning and not an error as it is just more information being captured around the pushed container that might not be available at the time we make the call. Apologies for the confusion here. I'll slate this for the next release.