Compare commits

..

14 Commits

Author SHA1 Message Date
mag37
d8b30b2363 bugsquash+thanks
Added info about filenames and sorting.
+ Special thanks to my rubber ducklings.
2023-02-01 19:54:25 +01:00
mag37
22c8d5e423 added sort
Alphabetical sorting of the container lists.
2023-02-01 19:41:56 +01:00
mag37
05c7c8f0dd sort + compose-path
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.
2023-02-01 19:39:43 +01:00
mag37
8ff701428b Added known issue, filename
Not working with other filenames than `docker-compose.yml` - fix will be merged soon.
2023-02-01 18:48:01 +01:00
mag37
f740527595 Update README.md 2023-01-31 14:55:00 +01:00
mag37
5d5d7eaffe Update README.md 2023-01-31 14:52:30 +01:00
mag37
986de413fe Delete example_run.gif 2023-01-31 10:49:16 +01:00
mag37
c48b94cd7a Update README.md 2023-01-31 10:48:54 +01:00
mag37
270456c583 new example gif
New gif to show the latest release.
2023-01-31 10:48:30 +01:00
mag37
7b18a27834 new example gif
New example gif to show the latest release.
2023-01-31 10:46:56 +01:00
mag37
c189f40842 Delete example_run.gif 2023-01-31 10:45:45 +01:00
mag37
7f182cddab new example
Updated example gif to show the latest version.
2023-01-31 10:44:18 +01:00
mag37
9162ad2457 Update dockcheck_docker-run_ver.sh
added version number:
### VERSION v.0.1.0
2023-01-30 20:40:00 +01:00
mag37
c635d03dbd version-comment
added:
### VERSION v.0.1.0
2023-01-30 20:39:27 +01:00
5 changed files with 28 additions and 9 deletions

View File

@@ -1,13 +1,12 @@
# dockcheck
### A script checking updates for docker images **without the need of pulling** - then having the option to auto-update either all or selecting specific containers.
### A script checking updates for docker images **without the need of pulling** - then optionally auto-update chosen containers.
With the help of [`regctl`](https://github.com/regclient/regclient). This is just a concept for inspiration, use with care.
___
## Dependencies:
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.
`regctl` by [regclient](https://github.com/regclient/regclient) (will ask to download `regctl` if not in `PATH` or `PWD`)
___
## `dockcheck.sh`
```bash
@@ -23,7 +22,7 @@ Options:
![](https://github.com/mag37/dockcheck/blob/main/example_run.gif)
![](https://github.com/mag37/dockcheck/blob/main/example.gif)
Basic example:
```bash
@@ -68,6 +67,8 @@ No updates installed, exiting
- ~~Faulty registry checkups stopped the updates completely.~~
- ~~No clear checks to skip containers producing errors.~~
- ~~Multi-digest images didn't correctly check with registry, giving false positives on updates.~~
- ~~Not working with filenames other than `docker-compose.yml`~~
- ~~Lists are not alphabetically sorted (due to stacks and other parameters)~~
### :hammer: Known issues
- ~~No granular choice of what to update (except initial name filter).~~
@@ -90,3 +91,7 @@ Updates available for local_nginx.
nginx_reverse is already latest.
Updates available for paperless-ng.
```
## Special Thanks:
:bison: [t0rnis](https://github.com/t0rnis)
:leopard: [Palleri](https://github.com/Palleri)

View File

@@ -1,6 +1,7 @@
#!/bin/bash
### VERSION v.0.1.1
# Help Function:
### Help Function:
Help() {
echo "Syntax: dockcheck.sh [OPTION] [part of name to filter]"
echo "Example: dockcheck.sh -a ng"
@@ -99,6 +100,12 @@ for i in $(docker ps --filter "name=$SearchName" --format '{{.Names}}') ; do
fi
done
### Sort arrays alphabetically
IFS=$'\n'
NoUpdates=($(sort <<<"${NoUpdates[*]}"))
GotUpdates=($(sort <<<"${GotUpdates[*]}"))
GotErrors=($(sort <<<"${GotErrors[*]}"))
unset IFS
### Create new Array to use for the numbered list:
NumberedUpdates=(ALL "${GotUpdates[@]}")
@@ -128,9 +135,9 @@ if [ -n "$GotUpdates" ] ; then
if [ "$UpdYes" != "${UpdYes#[Yy]}" ] ; then
for i in "${SelectedUpdates[@]}"
do
ContPath=$(docker inspect "$i" --format '{{ index .Config.Labels "com.docker.compose.project.working_dir"}}')
$DockerBin -f "$ContPath/docker-compose.yml" pull
$DockerBin -f "$ContPath/docker-compose.yml" up -d
ContPath=$(docker inspect "$i" --format '{{ index .Config.Labels "com.docker.compose.project.config_files"}}')
$DockerBin -f "$ContPath" pull
$DockerBin -f "$ContPath" up -d
done
else
printf "\nNo updates installed, exiting.\n"

View File

@@ -1,11 +1,12 @@
#!/bin/bash
### VERSION v.0.1.1
### DOCKER RUN - VERSION
### WARNING WONT REBUILD CONTAINERS - ONLY GRAB NEW IMAGES
### If running docker compose, use the main version. (recommended!)
# Help Function:
### Help Function:
Help() {
echo "Syntax: dockcheck.sh [OPTION] [part of name to filter]"
echo "Example: dockcheck.sh -a ng"
@@ -104,6 +105,12 @@ for i in $(docker ps --filter "name=$SearchName" --format '{{.Names}}') ; do
fi
done
### Sort arrays alphabetically
IFS=$'\n'
NoUpdates=($(sort <<<"${NoUpdates[*]}"))
GotUpdates=($(sort <<<"${GotUpdates[*]}"))
GotErrors=($(sort <<<"${GotErrors[*]}"))
unset IFS
### Create new Array to use for the numbered list:
NumberedUpdates=(ALL "${GotUpdates[@]}")

BIN
example.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB