added architecture workaround

This commit is contained in:
mag37
2024-01-06 08:40:26 +01:00
parent 92ba4a184e
commit edf6d5bd72

View File

@ -15,7 +15,7 @@
<h4 align="center">With features like excluding specific containers, filter by name, auto-prune dangling images and more.</h4</h3>
### :bell: Recent changes
### :bell: Changelog
- **v0.3.3**: Added Apprise template and the option `-i` inform - to send notifications.
- **v0.3.2**: Added a notify function to wrap a notify-script, currently DSM/Ssmtp + template script.
- **v0.3.1**: Addded option `-m` , monochrome mode - no printf color codes.
@ -32,9 +32,10 @@
___
## Dependencies
Running docker (duh) and compose, either standalone or plugin.
[`regclient/regctl`](https://github.com/regclient/regclient) (Licensed under [Apache-2.0 License](http://www.apache.org/licenses/LICENSE-2.0))
User will be prompted to download `regctl` if not in `PATH` or `PWD`
- Running docker (duh) and compose, either standalone or plugin.
- [`regclient/regctl`](https://github.com/regclient/regclient) (Licensed under [Apache-2.0 License](http://www.apache.org/licenses/LICENSE-2.0))
- User will be prompted to download `regctl` if not in `PATH` or `PWD`.
- regctl requires `amd64/aarch64` - see [workaround](#workaround-for-non-amd-aarch) if other architecture is used.
___
@ -93,6 +94,7 @@ Run it scheduled with `-ni` to only get notified when there's updates available!
Further additions are welcome - suggestions or PR!
Initiated and first contributed by [yoyoma2](https://github.com/yoyoma2).
### :warning: `-r flag` disclaimer and warning
**Wont auto-update the containers, only their images. (compose is recommended)**
`docker run` dont support using new images just by restarting a container.
@ -103,6 +105,27 @@ Containers need to be manually stopped, removed and created again to run on the
- Not respecting `--profile` options when re-creating the container.
- Not working well with containers created by Portainer.
### Workaround for non **amd64** / **aarch64**
`regctl` provides binaries for amd64/aarch64, to use on other architecture you could try this workaround.
Run regctl in a contianer wrapped in a shell script. Copied from [regclient/docs/install.md](https://github.com/regclient/regclient/blob/main/docs/install.md):
```sh
cat >regctl <<EOF
#!/bin/sh
opts=""
case "\$*" in
"registry login"*) opts="-t";;
esac
docker container run \$opts -i --rm --net host \\
-u "\$(id -u):\$(id -g)" -e HOME -v \$HOME:\$HOME \\
-v /etc/docker/certs.d:/etc/docker/certs.d:ro \\
ghcr.io/regclient/regctl:latest "\$@"
EOF
chmod 755 regctl
```
Test it with `./regctl --help` and then either add the file to the same path as *dockcheck.sh* or in your path (eg. `~/.local/bin/regctl`).
## `dc_brief.sh`
Just a brief, slimmed down version of the script to only print what containers got updates, no updates or errors.