diff options
Diffstat (limited to 'packaging/docker/run.sh')
-rwxr-xr-x | packaging/docker/run.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/packaging/docker/run.sh b/packaging/docker/run.sh index 9029e22b..ed77c394 100755 --- a/packaging/docker/run.sh +++ b/packaging/docker/run.sh @@ -21,6 +21,8 @@ if [ ! "${DISABLE_TELEMETRY:-0}" -eq 0 ] || touch /etc/netdata/.opt-out-from-anonymous-statistics fi +chmod o+rX / # Needed to fix permissions issues in some cases. + BALENA_PGID=$(stat -c %g /var/run/balena.sock 2>/dev/null || true) DOCKER_PGID=$(stat -c %g /var/run/docker.sock 2>/dev/null || true) @@ -67,4 +69,17 @@ if [ -n "${NETDATA_CLAIM_URL}" ] && [ -n "${NETDATA_CLAIM_TOKEN}" ] && [ ! -f /v -daemon-not-running fi +if [ -n "${NETDATA_EXTRA_APK_PACKAGES}" ]; then + echo "Fetching APK repository metadata." + if ! apk update; then + echo "Failed to fetch APK repository metadata." + else + echo "Installing supplementary packages." + # shellcheck disable=SC2086 + if ! apk add --no-cache ${NETDATA_EXTRA_APK_PACKAGES}; then + echo "Failed to install supplementary packages." + fi + fi +fi + exec /usr/sbin/netdata -u "${DOCKER_USR}" -D -s /host -p "${NETDATA_LISTENER_PORT}" "$@" |