microscaling / microbadger

What's inside your Docker containers?
Other
159 stars 17 forks source link

403 errors fetching layer size information from Docker Hub #77

Open rossf7 opened 4 years ago

rossf7 commented 4 years ago

Since late 2019 the method we use to fetch the size of image layers from Docker Hub has been broken for most images.

We don't have a solution but we've now open sourced the Micro Badger code. So the problem is clear and in the hope the community can help with fixing it.

We make a HEAD request instead of a GET request to get the layer size. This is more efficient and is necessary because layers can be very large. This still works for ADD commands in Dockerfiles but for RUN commands and several others we get 403 responses.

For some simple images like alpine the inspection process still works but for most images it fails. The relevant code is here and the problem can be reproduced locally with Docker Compose.

Run code

Fetch image