go-containerregistry
go-containerregistry copied to clipboard
crane copy v1 image to registry which only supports v2 fails
When I try to copy an image with a v1 schema to a registry which only supports v2 (docker registry dropped the support for v1 images by default in 2.7.0) I get the following error:
$ crane copy quay.io/k8scsi/livenessprobe:v2.0.0 localhost:5000/k8scsi/livenessprobe:v2.0.0
...
failed to copy schema 1 image: PUT http://localhost:5000/v2/k8scsi/livenessprobe/manifests/v2.0.0: UNKNOWN: unknown error; map[]
Is it possible to convert the image to a v2 schema? It seems that this got already discussed in https://github.com/google/go-containerregistry/issues/377#issuecomment-471662167 but i could not find the appropriate code.
Steps to reproduce:
docker run -it --rm -p 5000:5000 --name registry registry:2.7.1
crane copy quay.io/k8scsi/livenessprobe:v2.0.0 localhost:5000/k8scsi/livenessprobe:v2.0.0