Fixed a breaking error - pulling new images did not use the actual image:tag, but only defaulted to latest.
Hence bumping the version to alert new users to pull the latest.
Fixes:
- Checks if curl/wget exist to not get an empty `regctl` binary.
- Extra check if `regctl` binary is functional before continuing.
- changed shebang to `#!/usr/bin/env bash` for portability.
- General cleaning. (y/n checks and space saving)
New:
- Rework of the `choosecontainers` function
- `[aA]` to update ALL (was `0` before and part of the list/array)
- numbers starting from 1 (instead of 0)
- will prompt for new choice if picking numbers/letters out of bound.
- `docker prune` option after completed updates.
- additionally a`-p` flag for automatic update+prune, eg `./dockcheck.sh -yp`
- Added [GNU GPL v3.0](https://www.gnu.org/licenses/gpl-3.0-standalone.html) license.
printf formatting fixes
read formatting fixes
find/replace instead of sed
directly check error on regctl instead of indirectly
safer array-checks (not expanding without index)
Wont break if one of the chosen containers are created with docker run.
Added checks if a container is started with docker run, then skipping (default) or updating the image for manual docker run recreation (flag -r required).
Added alphabetical sorting to the lists.
Changed the path accessing the compose-file to be referencing the **actual** compose-file, not just the working dir. That way allowing people to have different naming-schemes for their composes.
- Added a way to choose from a numbered list what to update.
- Repairing some array-mistakes.
- Cleaned up some formatting and presentation.
- Set so that choosing -y or -n with flags wont give a numbered list.
- Edited options, auto-update through either -y or -a (yes or auto) with same result.
Changed the logic in comparing the digests - if the local check had multiple digests for an image, the old logic would be inaccurate.
New logic just check if the newest digest is among the list of local digests, should avoid some false positives.
Added error check so that instead of breaking, if containers cant be checked on the registry (eg. locally built or deprecated) they'll be added to a error-list.