dragonflyoss / Dragonfly2

Dragonfly is an open source P2P-based file distribution and image acceleration system. It is hosted by the Cloud Native Computing Foundation (CNCF) as an Incubating Level Project.
https://d7y.io
Apache License 2.0
2.26k stars 287 forks source link

Can't pull images from lscr.io/linuxserver #3499

Open AllenShen opened 1 month ago

AllenShen commented 1 month ago

Bug report:

When pulling image from lscr.io/linuxserver, like lscr.io/linuxserver/plex:latest or lscr.io/linuxserver/kasm:latest, error occured:

image

actually the image doesn't require authentication

we found out this image registry is a 'mirror' registry, requests to this registry will be moved(302) to ghcr.io, when we just run ‘docker pull ghcr.io/linuxserver/plex:latest’, it works. Seems like dragonfly doesn't support responses with http code 302 when reading blobs from registry.

Expected behavior:

pull image successfully

How to reproduce it:

docker pull lscr.io/linuxserver/plex:latest

Environment:

gaius-qi commented 1 month ago

@jim3ma

caiyesd commented 1 month ago

I met this issue as well.

lixin0111 commented 1 month ago

registry302 have discusses this issue in dingding group ; when download the blob layer dragonfly receive an 302 response, golang http-client auto redirect to the new registry and got an 401 error; dragonfly need to reply this 302 response to docker, and docker will redownload the blob in another registry with token.

jim3ma commented 1 month ago

We will add an option to avoid redirect http in dragonfly.