Преглед изворни кода

fix: run the hosted installer with bash, not sh

The installer is a bash script ([[ ]], arrays, declare -A); Alpine's sh
is busybox ash and dies on the first [[ (exit 2), so the image build
looped. Downloaded to a file and run as bash <file> -y — the pipe form
re-execs against /dev/tty, which no RUN has.
clanker пре 1 месец
родитељ
комит
c2d326c27d
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      README.md
  2. 1 1
      containers/usmrad/Containerfile

+ 1 - 1
README.md

@@ -461,7 +461,7 @@ Semantics:
 - When the app exits — for any reason, polling or not — usmrad exits with the child's exit code; restarts belong to the container supervisor
 - SPM integration rides the configured helper (`usm-spm-apk` in the Alpine container), so dependencies may come from `apk` as well as USM repositories
 
-An image with `usmrad` as entrypoint is built from `containers/usmrad/Containerfile`: the hosted installer at `https://packages.astrologue.nz/install-usm.sh` (downloaded to a file and run as `sh <file> -y`, never `curl | sh`, because the payload extracts relative to `$0`) brings in USM, usmrad and the apk SPM wiring; the image enrolls and adds the `web-stack` repository at build time so its packages resolve out of the box. The run pattern (USMRAD_USM_REPOS only needed for repositories beyond web-stack):
+An image with `usmrad` as entrypoint is built from `containers/usmrad/Containerfile`: the hosted installer at `https://packages.astrologue.nz/install-usm.sh` (downloaded to a file and run as `bash <file> -y` — the installer is a bash script, so `sh` only works where `sh` is bash — never `curl | sh`, whose pipe path re-execs against `/dev/tty`) brings in USM, usmrad and the apk SPM wiring; the image enrolls and adds the `web-stack` repository at build time so its packages resolve out of the box. The run pattern (USMRAD_USM_REPOS only needed for repositories beyond web-stack):
 
 ```bash
 podman run --rm \

+ 1 - 1
containers/usmrad/Containerfile

@@ -26,7 +26,7 @@
 FROM alpine:latest
 RUN apk add --no-cache bash git curl ca-certificates
 RUN curl -fsSL https://packages.astrologue.nz/install-usm.sh -o /tmp/install-usm.sh \
-    && sh /tmp/install-usm.sh -y \
+    && bash /tmp/install-usm.sh -y \
     && rm /tmp/install-usm.sh
 RUN usm enroll -y \
     && usm add-repo -y https://packages.astrologue.nz/repo/web-stack/repo.usmr