mirror of
https://github.com/mag37/dockcheck.git
synced 2026-04-17 18:07:46 +00:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8b30b2363 | ||
|
|
22c8d5e423 | ||
|
|
05c7c8f0dd | ||
|
|
8ff701428b | ||
|
|
f740527595 | ||
|
|
5d5d7eaffe | ||
|
|
986de413fe | ||
|
|
c48b94cd7a | ||
|
|
270456c583 | ||
|
|
7b18a27834 | ||
|
|
c189f40842 | ||
|
|
7f182cddab | ||
|
|
9162ad2457 | ||
|
|
c635d03dbd |
13
README.md
13
README.md
@@ -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:
|
||||
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
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)
|
||||
|
||||
15
dockcheck.sh
15
dockcheck.sh
@@ -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"
|
||||
|
||||
@@ -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
BIN
example.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 510 KiB |
BIN
example_run.gif
BIN
example_run.gif
Binary file not shown.
|
Before Width: | Height: | Size: 72 KiB |
Reference in New Issue
Block a user