container-diff
container-diff copied to clipboard
ignore tags when digest present
Expected behavior
If I run
container-diff analyze postgres:11-alpine@sha256:f85c0e55cc917bb76083a92a4cc5f1af080298eb5a1f5449a8dc8665f7fef48e
I expect analyze info to be printed
Actual behavior
container-diff errors out with the following log:
ERRO[0000] error retrieving image postgres:11-alpine@sha256:f85c0e55cc917bb76083a92a4cc5f1af080298eb5a1f5449a8dc8665f7fef48e: parsing image reference: could not parse reference
Information
-
container-diff version:
v0.15.0 -
Operating system:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
Steps to reproduce the behavior
- Run
container-diff analyze postgres@sha256:f85c0e55cc917bb76083a92a4cc5f1af080298eb5a1f5449a8dc8665f7fef48eand notice that it runs fine - Run with the optional digest
container-diff analyze postgres:11-alpine@sha256:f85c0e55cc917bb76083a92a4cc5f1af080298eb5a1f5449a8dc8665f7fef48eand notice the error message
hmm, at first glance this looks like it could be a go-containerregistry bug? that's what we use for all our image handling, and I don't think we do any preprocessing of tags before we pass the reference over to it
I experienced the same issue today with ghcr.io.