mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-17 05:42:54 -04:00
Update 'INSTALL_PACKAGES' structure to use '|' delimited list.
Renamed installer script to 98.
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
# Package Install - Universal Docker mod
|
||||
|
||||
Using this mod you can install any package during starup by providing it through the environment variable `INSTALL_PACKAGES`. This is then passed into the installation command as such: `apt install -y --no-install-recommends ${INSTALL_PACKAGES}` or `apk add --no-cache ${INSTALL_PACKAGES}` for Alpine based images.
|
||||
Using this mod you can install any package during starup by providing it through the environment variable `INSTALL_PACKAGES`. This is then passed into the installation command as such: `apt install -y --no-install-recommends ...` or `apk add --no-cache ...` for Alpine based images.
|
||||
|
||||
In any docker container arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:universal-package-install`
|
||||
|
||||
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/mods:universal-package-install|linuxserver/mods:universal-stdout-logs`
|
||||
|
||||
For example, to install `rsync`, `git` and `nginx` add the following lines to your docker compose service:
|
||||
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/mods:universal-package-install|linuxserver/mods:universal-stdout-logs`. Similarly, for installing multiple packages separate them by `|`.
|
||||
E.g., to install `rsync`, `git` and `nginx` add the following lines to your docker compose service:
|
||||
```yaml
|
||||
- DOCKER_MODS=linuxserver/mods:universal-package-install
|
||||
- INSTALL_PACKAGES=rsync git nginx
|
||||
```
|
||||
- INSTALL_PACKAGES=rsync|git|nginx
|
||||
```
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# Exit if no installable packages are provided
|
||||
if [ -z ${INSTALL_PACKAGES+x} ]; then
|
||||
echo "**** No packages to install ****"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Ubuntu
|
||||
if [ -f /usr/bin/apt ]; then
|
||||
apt-get install -y --no-install-recommends ${INSTALL_PACKAGES}
|
||||
fi
|
||||
|
||||
# Alpine
|
||||
if [ -f /sbin/apk ]; then
|
||||
apk add --no-cache ${INSTALL_PACKAGES}
|
||||
fi
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# Exit if no installable packages are provided
|
||||
if [ -z ${INSTALL_PACKAGES+x} ]; then
|
||||
echo "**** No packages to install ****"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
#Split list of packages on delimiter '|'
|
||||
IFS='|'
|
||||
INSTALL_PACKAGES=(${INSTALL_PACKAGES})
|
||||
for PKG in "${INSTALL_PACKAGES[@]}"; do
|
||||
echo "Installing ${PKG}"
|
||||
|
||||
# Ubuntu
|
||||
if [ -f /usr/bin/apt ]; then
|
||||
apt install -y --no-install-recommends ${PKG}
|
||||
fi
|
||||
|
||||
# Alpine
|
||||
if [ -f /sbin/apk ]; then
|
||||
apk add --no-cache ${PKG}
|
||||
fi
|
||||
|
||||
done
|
||||
Reference in New Issue
Block a user