fix(iso): non-root registries.conf.d write killed the build under set -e
The insecure-registry config was written to /etc unconditionally; as the archipelago build user the redirection fails and set -e aborts check_tools before Step 1. Write to the rootless podman per-user config dir when not root, tolerate failure (nodes may already carry the config), and drop the duplicated 146.59.87.168:3000 entry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
1f2cf1e13c
commit
7a08ed6687
@ -212,18 +212,25 @@ check_tools() {
|
||||
fi
|
||||
|
||||
# Ensure insecure registry config for Archipelago app registries that are
|
||||
# intentionally served over HTTP during ISO builds.
|
||||
# intentionally served over HTTP during ISO builds. Rootless podman reads
|
||||
# the per-user config dir; only root can write /etc. Never fatal — the
|
||||
# node may already carry this config.
|
||||
if [[ "$CONTAINER_CMD" == podman* ]]; then
|
||||
mkdir -p /etc/containers/registries.conf.d
|
||||
cat > /etc/containers/registries.conf.d/archipelago.conf <<'REGCONF'
|
||||
[[registry]]
|
||||
location = "146.59.87.168:3000"
|
||||
insecure = true
|
||||
|
||||
if [ "$(id -u)" = "0" ]; then
|
||||
REGCONF_DIR="/etc/containers/registries.conf.d"
|
||||
else
|
||||
REGCONF_DIR="${HOME}/.config/containers/registries.conf.d"
|
||||
fi
|
||||
if mkdir -p "$REGCONF_DIR" 2>/dev/null && cat > "$REGCONF_DIR/archipelago.conf" 2>/dev/null <<'REGCONF'
|
||||
[[registry]]
|
||||
location = "146.59.87.168:3000"
|
||||
insecure = true
|
||||
REGCONF
|
||||
then
|
||||
:
|
||||
else
|
||||
echo " ⚠️ Could not write $REGCONF_DIR/archipelago.conf — assuming registry config already present"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user