regclient / regclient

Docker and OCI Registry Client in Go and tooling using those libraries.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Issue] image copy failed: Invalid image, fail to parse 'manifest.json'

shaofeng66 opened this issue · comments

Current Behavior

Expected Behavior

Steps To Reproduce

~/Desktop/regctl-darwin-arm64 -v debug image copy docker.io/library/nginx:latest swr.cn-north-4.myhuaweicloud.com/ys1000/nginx:shaofeng66-$(date +%Y%m%d%H%M%S)
DEBU[0000] Loading host config                           api= blobChunk=0 blobMax=0 helper= hostname=registry-1.docker.io mirrors="[]" name=docker.io pathPrefix= repoAuth=false tls=enabled user=shaofeng66
DEBU[0000] Loading host config                           api= blobChunk=0 blobMax=0 helper= hostname=swr.cn-north-4.myhuaweicloud.com mirrors="[]" name=swr.cn-north-4.myhuaweicloud.com pathPrefix= repoAuth=false tls=enabled user=cn-north-4@4TSG6YVKHFSNQKYIVSZ2
DEBU[0000] regclient initialized                         VCSRef=9de7397da9f1c00dad5213519366002376b8d5ed VCSTag=v0.6.0
DEBU[0000] Image copy                                    digest-tags=false recursive=false source="docker.io/library/nginx:latest" target="swr.cn-north-4.myhuaweicloud.com/ys1000/nginx:shaofeng66-20240422122032"
DEBU[0000] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/shaofeng66-20240422122032" withAuth=false
DEBU[0000] Auth request parsed                           challenge="[{bearer map[realm:https://swr.cn-north-4.myhuaweicloud.com/swr/auth/v2/registry/auth/ scope:repository:ys1000/nginx: service:dockyard]}]"
DEBU[0000] Auth scope added                              host=swr.cn-north-4.myhuaweicloud.com scope="repository:ys1000/nginx:pull"
DEBU[0000] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/shaofeng66-20240422122032" withAuth=true
DEBU[0000] Request failed                                Status="Not Found" URL="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/shaofeng66-20240422122032"
DEBU[0001] http req                                      method=GET url="https://registry-1.docker.io/v2/library/nginx/manifests/latest" withAuth=false
DEBU[0001] Auth request parsed                           challenge="[{bearer map[realm:https://auth.docker.io/token scope:repository:library/nginx:pull service:registry.docker.io]}]"
DEBU[0002] http req                                      method=GET url="https://registry-1.docker.io/v2/library/nginx/manifests/latest" withAuth=true
DEBU[0003] Copy platform                                 digest="sha256:f8f7b3a7023235a68d6a838cb92470fbb39ce0ebd2fb7591b6126d7258df0691" platform=linux/arm/v5
DEBU[0003] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/sha256:f8f7b3a7023235a68d6a838cb92470fbb39ce0ebd2fb7591b6126d7258df0691" withAuth=true
DEBU[0003] Copy platform                                 digest="sha256:fdc96fac1d9081c49222faf4cdbb4d7d4bce90a9dc0172d010d7631dd5b6ffbd" platform=unknown/unknown
DEBU[0003] Copy platform                                 digest="sha256:ad452ea66b458df45c97e45cd8b8da8f00c1e599072b044dee9b63d0b61b79cf" platform=unknown/unknown
DEBU[0003] Copy platform                                 digest="sha256:0f344ba1d500d99d77331a8ca295160214df0017d744943d4e2ce9a9dea03764" platform=unknown/unknown
DEBU[0003] Copy platform                                 digest="sha256:998300ef6d9d67a197133f587dda667a9f731dda4d98e3c304e5a8963bae0ff6" platform=linux/arm/v7
DEBU[0003] Copy platform                                 digest="sha256:1e4de381f88885b3c50808c879e5a3b53af4dfa10b2ab95390281507758997cf" platform=unknown/unknown
DEBU[0003] Copy platform                                 digest="sha256:492350e1ec8f8e1128bd984c3d28e8e9c53279d1104b49fb0606e9de8a56b082" platform=linux/mips64le
DEBU[0003] Copy platform                                 digest="sha256:5871b6261f597e813dc8ac8c43ce4d93b36881ca591fe1f4afb63bf3435d1de2" platform=unknown/unknown
DEBU[0003] Copy platform                                 digest="sha256:92d2bc01af0bc0ff9e471e89eed318425359aeec8b97b4a4967b9d37de13809a" platform=unknown/unknown
DEBU[0003] Copy platform                                 digest="sha256:d012bdc4072beb7ed40642282a09cca260a867074b653c700d6394954f00fce0" platform=linux/386
DEBU[0003] Copy platform                                 digest="sha256:b5873c5e785c0ae70b4f999d6719a27441126667088c2edd1eaf3060e4868ec5" platform=linux/amd64
DEBU[0003] Copy platform                                 digest="sha256:ab0ccfe8d7d2241710223f3d795a5b874e1f3e8639c8654cfde6c6a5190cb36c" platform=linux/s390x
DEBU[0003] Copy platform                                 digest="sha256:136b218f73aa3e794f1ba842892e86ae94eab9de38b336c45b86838f5bcf0a6d" platform=unknown/unknown
DEBU[0003] Copy platform                                 digest="sha256:caef0c3cb1c373f64e6f1ffb065e590ab5632e3b1f8ea140f84a47c45bc0870b" platform=unknown/unknown
DEBU[0003] Copy platform                                 digest="sha256:19868d99fccd8651a3677442e632cd9d5dbb223bd759a26b5db2e6f1567e04f8" platform=linux/ppc64le
DEBU[0003] Copy platform                                 digest="sha256:50376dc014ca05120de7018b80cbe5b9246e057e8eec26defd40a172f6d8ab55" platform=linux/arm64
DEBU[0003] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/sha256:ad452ea66b458df45c97e45cd8b8da8f00c1e599072b044dee9b63d0b61b79cf" withAuth=true
DEBU[0003] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/sha256:0f344ba1d500d99d77331a8ca295160214df0017d744943d4e2ce9a9dea03764" withAuth=true
DEBU[0003] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/sha256:1e4de381f88885b3c50808c879e5a3b53af4dfa10b2ab95390281507758997cf" withAuth=true
DEBU[0003] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/sha256:5871b6261f597e813dc8ac8c43ce4d93b36881ca591fe1f4afb63bf3435d1de2" withAuth=true
DEBU[0003] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/sha256:92d2bc01af0bc0ff9e471e89eed318425359aeec8b97b4a4967b9d37de13809a" withAuth=true
DEBU[0003] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/sha256:fdc96fac1d9081c49222faf4cdbb4d7d4bce90a9dc0172d010d7631dd5b6ffbd" withAuth=true
DEBU[0003] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/sha256:492350e1ec8f8e1128bd984c3d28e8e9c53279d1104b49fb0606e9de8a56b082" withAuth=true
DEBU[0003] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/sha256:998300ef6d9d67a197133f587dda667a9f731dda4d98e3c304e5a8963bae0ff6" withAuth=true
DEBU[0003] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/sha256:d012bdc4072beb7ed40642282a09cca260a867074b653c700d6394954f00fce0" withAuth=true
DEBU[0004] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/sha256:b5873c5e785c0ae70b4f999d6719a27441126667088c2edd1eaf3060e4868ec5" withAuth=true
DEBU[0004] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/sha256:ab0ccfe8d7d2241710223f3d795a5b874e1f3e8639c8654cfde6c6a5190cb36c" withAuth=true
DEBU[0004] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/sha256:136b218f73aa3e794f1ba842892e86ae94eab9de38b336c45b86838f5bcf0a6d" withAuth=true
DEBU[0004] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/sha256:caef0c3cb1c373f64e6f1ffb065e590ab5632e3b1f8ea140f84a47c45bc0870b" withAuth=true
DEBU[0004] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/sha256:19868d99fccd8651a3677442e632cd9d5dbb223bd759a26b5db2e6f1567e04f8" withAuth=true
DEBU[0004] http req                                      method=HEAD url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/sha256:50376dc014ca05120de7018b80cbe5b9246e057e8eec26defd40a172f6d8ab55" withAuth=true
DEBU[0004] Auth scope added                              host=swr.cn-north-4.myhuaweicloud.com scope="repository:ys1000/nginx:pull,push"
DEBU[0005] http req                                      method=PUT url="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/shaofeng66-20240422122032" withAuth=true
DEBU[0005] Request failed                                Status="Bad Request" URL="https://swr.cn-north-4.myhuaweicloud.com/v2/ys1000/nginx/manifests/shaofeng66-20240422122032"
WARN[0005] Failed to push manifest                       err="failed to put manifest swr.cn-north-4.myhuaweicloud.com/ys1000/nginx:shaofeng66-20240422122032: request failed: unexpected http status code: Bad Request [http 400]: {\"errors\":[{\"code\":\"MANIFEST_INVALID\",\"message\":\"Invalid image, fail to parse 'manifest.json'\"}]}" target="swr.cn-north-4.myhuaweicloud.com/ys1000/nginx:shaofeng66-20240422122032"
failed to put manifest swr.cn-north-4.myhuaweicloud.com/ys1000/nginx:shaofeng66-20240422122032: request failed: unexpected http status code: Bad Request [http 400]: {"errors":[{"code":"MANIFEST_INVALID","message":"Invalid image, fail to parse 'manifest.json'"}]}

Version

~/Desktop/regctl-darwin-arm64 version
VCSTag:     v0.6.0
VCSRef:     9de7397da9f1c00dad5213519366002376b8d5ed
VCSCommit:  9de7397da9f1c00dad5213519366002376b8d5ed
VCSState:   clean
VCSDate:    2024-03-24T18:09:00Z
Platform:   darwin/arm64
GoVer:      go1.22.1
GoCompiler: gc

Environment

Anything else

it turns out huawei SWR does not support OCI image index .