Merge ~ubuntu-docker-images/ubuntu-docker-images/+git/utils:software-versions-image-extraction into ~ubuntu-docker-images/ubuntu-docker-images/+git/utils:master
Status: | Merged |
---|---|
Approved by: | Bryce Harrington |
Approved revision: | ffa06060cc9ea82b9af7ae74306a2c19c0120443 |
Merge reported by: | Bryce Harrington |
Merged at revision: | ffa06060cc9ea82b9af7ae74306a2c19c0120443 |
Proposed branch: | ~ubuntu-docker-images/ubuntu-docker-images/+git/utils:software-versions-image-extraction |
Merge into: | ~ubuntu-docker-images/ubuntu-docker-images/+git/utils:master |
Diff against target: |
258 lines (+124/-46) 2 files modified
README.software-versions.md (+20/-0) software-versions.sh (+104/-46) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Athos Ribeiro | Approve | ||
Canonical Server | Pending | ||
Sergio Durigan Junior | Pending | ||
Review via email: mp+401343@code.launchpad.net |
Description of the change
This implements the remaining functionality for looking up version info from the docker images. The text table output is getting a bit dense, but here's how it looks now:
Software focal hirsute
postgres: 12.6-0ubuntu0.
memcached: 1.5.22-2 1.5.22-2ubuntu0.1 (1.5.22) 1.6.9+dfsg-1 1.6.9+dfsg-1 (1.6.9)
apache2: 2.4.41-4ubuntu3.1 2.4.41-4ubuntu3.1 (2.4.41) 2.4.46-4ubuntu1 ??? (2.4.46)
mysql: 8.0.23-
redis: 5:5.0.7-2 5:5.0.7-2 (5.0.7) 5:6.0.11-1 5:6.0.11-1 (6.0.11)
nginx: 1.18.0-0ubuntu1 1.18.0-0ubuntu1 (1.18.0) 1.18.0-6ubuntu8 1.18.0-6ubuntu4 (1.18.0)
(Note it's already telling us there are update opportunities for focal's memcached and hirsute's nginx.)
And check out the JSON report:
https:/
You'll note a huge amount of duplicate code between the text and json reports. I haven't decided whether to refactor that better, or just drop the text table -- as soon as we add another Ubuntu release to the mix the width of this table will become too unwieldy -- but whichever way, I'll leave that to a future MP.
You'll also note I'm still using hard-coded lists of images rather than using list-all-images.sh since I need to have some associated data. Refactoring this is also planned but left for a future MP.
Nice work! LGTM
I have only one question: should we either remove the pulled images or add an option to do so? If this script is running constantly in some CI environment, the internal docker storage may grow considerably depending on the frequency that new images get released.
In other words, would it be worth to sacrifice network data consumption in a CI environment (always pulling images even when no new images were pushed to the registries) to possibly avoid storage issues in the future?
Alternatively, we could keep only the latest versions (the one holding the tag) of each image in the host running the script.