dockcheck/README.md

68 lines
1.7 KiB
Markdown
Raw Normal View History

2023-01-18 11:47:52 +01:00
# dockcheck
2023-01-19 18:42:50 +01:00
### Scripts and functions to check updates for docker images, **without the need of pulling**.
2023-01-19 12:29:22 +01:00
With the help of [`regctl`](https://github.com/regclient/regclient).
2023-01-18 21:03:42 +01:00
This is just a concept for fun and inspiration, use with care.
2023-01-18 13:46:00 +01:00
___
2023-01-18 13:44:39 +01:00
2023-01-18 13:45:15 +01:00
## Dependencies:
2023-01-18 13:46:00 +01:00
Running docker (duh) and compose, either standalone or plugin.
`regctl` by [regclient](https://github.com/regclient/regclient)
The script will ask to download `regctl` if it's not in PATH or current directory.
2023-01-18 13:46:00 +01:00
___
2023-01-18 13:45:30 +01:00
## `dockcheck.sh`
2023-01-18 21:07:52 +01:00
```bash
$ dockcheck.sh -h
Syntax: dockcheck.sh [OPTION] [optional string to filter names]
Options:
-h Print this Help.
-a Automatic updates, without interaction.
-n No updates, only checking availability.
```
2023-01-19 12:20:02 +01:00
A script to check for updates on all currently running containers without pulling images, list them and give the option to update.
Basic example:
```bash
$ dockcheck.sh
2023-01-18 21:07:52 +01:00
. . .
Containers with updates available:
whoogle-search
Containers on latest version:
glances
homer
Do you want to update? y/[n]
y
2023-01-18 21:12:00 +01:00
```
2023-01-19 12:20:02 +01:00
Then it proceedes to run `pull` and `up -d` on every container with updates.
2023-01-19 12:21:05 +01:00
And with `-n` *No updates* and `gl` for `*gl*` filtering:
```bash
$ dockcheck.sh -n gl
. . .
Containers with updates available:
whoogle-search
Containers on latest version:
glances
No updates installed, exiting
```
2023-01-18 21:07:52 +01:00
2023-01-19 10:04:06 +01:00
Example-video:
![](https://github.com/mag37/dockcheck/blob/main/example_run.gif)
2023-01-18 21:03:42 +01:00
2023-01-19 12:24:34 +01:00
## `dupc_function.sh`
2023-01-19 12:28:15 +01:00
Function to quickly check for updates on a single contianer or list of containers by name. **Without the need of pulling**.
2023-01-18 21:03:42 +01:00
Preferably placed in `.bashrc` or similar.
Example:
2023-01-19 10:03:43 +01:00
```
2023-01-19 12:24:34 +01:00
$ dupc ng
2023-01-19 10:03:26 +01:00
Updates available for local_nginx.
nginx_reverse is already latest.
Updates available for paperless-ng.
2023-01-18 21:03:42 +01:00
```