mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-17 16:35:47 -04:00
Merge pull request #637 from linuxserver/mod-scripts-debug
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
These files are used by Linuxserver build processes to handle mods in our images. Not for end-user consumption.
|
These files are used by Linuxserver build processes to handle mods in our images. Not for end-user consumption.
|
||||||
|
|
||||||
|
* **15.05.23:** - Add DOCKER_MODS_DEBUG env.
|
||||||
* **19.03.23:** - Add quay.io support for mods.
|
* **19.03.23:** - Add quay.io support for mods.
|
||||||
* **25.02.23:** - Inject branding.
|
* **25.02.23:** - Inject branding.
|
||||||
* **05.02.23:** - Support multi-manifest mods for provenance, etc.
|
* **05.02.23:** - Support multi-manifest mods for provenance, etc.
|
||||||
|
|||||||
+11
-5
@@ -19,6 +19,12 @@ set_legacy_executable_bits() {
|
|||||||
/etc/services.d/*/* 2>/dev/null || true
|
/etc/services.d/*/* 2>/dev/null || true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [[ ${DOCKER_MODS_DEBUG,,} = "true" ]]; then
|
||||||
|
CURL_NOISE_LEVEL="-v"
|
||||||
|
else
|
||||||
|
CURL_NOISE_LEVEL="--silent"
|
||||||
|
fi
|
||||||
|
|
||||||
tamper_check() {
|
tamper_check() {
|
||||||
# Tamper check custom service locations
|
# Tamper check custom service locations
|
||||||
if [[ -d "${SERVICES_DIR}" ]] && [[ -n "$(find ${SERVICES_DIR}/* ! -user root 2>/dev/null)" ]]; then
|
if [[ -d "${SERVICES_DIR}" ]] && [[ -n "$(find ${SERVICES_DIR}/* ! -user root 2>/dev/null)" ]]; then
|
||||||
@@ -162,7 +168,7 @@ curl_check() {
|
|||||||
# Use different filtering depending on URL
|
# Use different filtering depending on URL
|
||||||
get_blob_sha() {
|
get_blob_sha() {
|
||||||
MULTIDIGEST=$(curl -f --retry 10 --retry-max-time 60 --retry-connrefused \
|
MULTIDIGEST=$(curl -f --retry 10 --retry-max-time 60 --retry-connrefused \
|
||||||
--silent \
|
${CURL_NOISE_LEVEL} \
|
||||||
--location \
|
--location \
|
||||||
--request GET \
|
--request GET \
|
||||||
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||||
@@ -171,7 +177,7 @@ get_blob_sha() {
|
|||||||
"${2}/${3}" | jq -r 'first(.manifests[].digest)?')
|
"${2}/${3}" | jq -r 'first(.manifests[].digest)?')
|
||||||
if [[ -z "${MULTIDIGEST}" ]]; then
|
if [[ -z "${MULTIDIGEST}" ]]; then
|
||||||
if DIGEST=$(curl -f --retry 10 --retry-max-time 60 --retry-connrefused \
|
if DIGEST=$(curl -f --retry 10 --retry-max-time 60 --retry-connrefused \
|
||||||
--silent \
|
${CURL_NOISE_LEVEL} \
|
||||||
--location \
|
--location \
|
||||||
--request GET \
|
--request GET \
|
||||||
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||||
@@ -182,7 +188,7 @@ get_blob_sha() {
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if DIGEST=$(curl -f --retry 10 --retry-max-time 60 --retry-connrefused \
|
if DIGEST=$(curl -f --retry 10 --retry-max-time 60 --retry-connrefused \
|
||||||
--silent \
|
${CURL_NOISE_LEVEL} \
|
||||||
--location \
|
--location \
|
||||||
--request GET \
|
--request GET \
|
||||||
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||||
@@ -249,7 +255,7 @@ run_mods() {
|
|||||||
# Get Dockerhub token for api operations
|
# Get Dockerhub token for api operations
|
||||||
TOKEN="$(
|
TOKEN="$(
|
||||||
curl -f --retry 10 --retry-max-time 60 --retry-connrefused \
|
curl -f --retry 10 --retry-max-time 60 --retry-connrefused \
|
||||||
--silent \
|
${CURL_NOISE_LEVEL} \
|
||||||
--header 'GET' \
|
--header 'GET' \
|
||||||
"${AUTH_URL}" |
|
"${AUTH_URL}" |
|
||||||
jq -r '.token'
|
jq -r '.token'
|
||||||
@@ -266,7 +272,7 @@ run_mods() {
|
|||||||
else
|
else
|
||||||
# Download and extract layer to /
|
# Download and extract layer to /
|
||||||
curl -f --retry 10 --retry-max-time 60 --retry-all-errors \
|
curl -f --retry 10 --retry-max-time 60 --retry-all-errors \
|
||||||
--silent \
|
${CURL_NOISE_LEVEL} \
|
||||||
--location \
|
--location \
|
||||||
--request GET \
|
--request GET \
|
||||||
--header "Authorization: Bearer ${TOKEN}" \
|
--header "Authorization: Bearer ${TOKEN}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user