google / google/go-containerregistry

crane copy v1 image to registry which only supports v2 fails

Open
#732 7 comments 0 reactions 0 assignees View on GitHub
lifecycle/frozen
Dominant language
Go
Stars
4k
Forks
686
Avg merge
2d 12h
Merged PRs (30d)
26

Description

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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.