microscaling / microbadger

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

Problem with variables in FROM statement? #66

Closed accetto closed 4 years ago

accetto commented 4 years ago

Hi, I've noticed that some of my images got zero-size badges and also layers info is not there. What could be the reason? Can you check it please? Thanks.

accetto/ubuntu-vnc-xfce-firefox-default accetto/xubuntu-vnc-angular accetto/xubuntu-vnc-chromium accetto/xubuntu-vnc-inkscape accetto/xubuntu-vnc-js-heroku-postgresql accetto/xubuntu-vnc-node accetto/xubuntu-vnc-typescript

accetto commented 4 years ago

I have a suspicion, that the problem could be that some Dockerfiles use variables in FROM statements, like for example accetto/xubuntu-vnc-node

ARG BASEIMAGE=accetto/xubuntu-vnc
ARG BASETAG=latest
FROM ${BASEIMAGE}:${BASETAG} as stage-utils

Could it be the reason for the message No matching base image on MicroBadger web page?

Do you analyze Dockerfiles or actual images?

rossf7 commented 4 years ago

@accetto Yes, this could cause a problem. We get the metadata from Docker Hub using the Docker Registry API.

To determine the base image we need to read the FROM layer and I don't think the ARGS will be rendered.

But see https://github.com/microscaling/microbadger/issues/38#issuecomment-532857473 we have some stability problems at the moment. We are getting a lot of 403 responses from Docker Hub when getting the size of layers which is probably the reason for the 0 bytes.

accetto commented 4 years ago

My assumption doesn't seem to be right. Layers are correctly displayed also in cases like described above, but the size is zero. Also other images, that are simpler and haven't changed for quite a while show zero sizes. The reason must be elsewhere.