simelo / repo-info-tools

Metadata generation (repo-info) for any public docker image
GNU General Public License v3.0
0 stars 2 forks source link

The script fails silently with some images. #1

Closed stdevPavelmc closed 6 years ago

stdevPavelmc commented 6 years ago
$ ./drib.sh skycoin/skycoindev-cli:develop
Ready to process the repo-info for 'skycoin/skycoindev-cli:develop => skycoin/skycoindev-cli:develop'.
Getting remote info...
Got token from: https://auth.docker.io/token?service=registry.docker.io&scope=repository:skycoin/skycoindev-cli:pull
Get remote digest: sha256:f078698f17c9fb74151b5e63aa6a959505f27fba1af95378ce760c91f0d7ea2a
Got image config
Parsing remote data to ./repo-info/remote/develop.md
$

Here the script fails silently, and don't write nothing to the "$tag.md" file, it must do it like this:

$ ./drib.sh library/registry:latest
Ready to process the repo-info for 'library/registry:latest => library/registry:latest'.
Getting remote info...
Got token from: https://auth.docker.io/token?service=registry.docker.io&scope=repository:library/registry:pull
Get remote digest: sha256:2e2f252f3c88679f1207d87d57c07af6819a1a17e22573bcef32804122d2f305
Got image config
Parsing remote data to ./repo-info/remote/latest.md
Done remote.
Getting local info...
Pulling the image from docker hub
latest: Pulling from library/registry
Digest: sha256:5a156ff125e5a12ac7fdec2b90b7e2ae5120fa249cf62248337b6d04abc574c8
Status: Image is up to date for registry:latest
Parsing local data to ./repo-info/local/latest.md
Done local.
All Done, thank you.
$

That's a ok run.

stdevPavelmc commented 6 years ago

Fixed in https://github.com/simelo/repo-info-tools/commit/1b4e73d6ade4bd6092cdc271aa9ed01fe72d535f

The docker exit wrap was catching simple errors and exiting the whole scripts.