I worked with url.Parse, but to find an image schema that could satisfy referencing a path, _and_ all the permutations of the docker image reference (registry:port/namespace/image:tag), it would best be a bunch of query parameters. Which is even _more_ ugly.

I had not considered the ipv6 address as a registry name. Though this logic should still hold up for an ipv6 address as well.