🔧 Replace symlink helper with ln -sf across all Alpine Dockerfiles 🔧

- Replace `/usr/local/bin/symlink` calls with native `ln -sf` for bash shell symlinks in all Alpine version Dockerfiles (3.14–3.22 and edge)
- Remove `coreutils` from ENV_PACKAGES in `.env.scripts.edge` and `PACK_LIST` in `Dockerfile.edge` as it is no longer needed

Dockerfile.3.14
Dockerfile.3.15
Dockerfile.3.16
Dockerfile.3.17
Dockerfile.3.18
Dockerfile.3.19
Dockerfile.3.20
Dockerfile.3.21
Dockerfile.3.22
Dockerfile.edge
.env.scripts.edge
This commit is contained in:
2026-05-04 13:26:33 -04:00
parent d9b8679f79
commit 22b01f7f43
11 changed files with 32 additions and 32 deletions
+3 -3
View File
@@ -73,9 +73,9 @@ RUN set -e; \
apk --no-cache add bash; \
SH_CMD="$(which sh 2>/dev/null||command -v sh 2>/dev/null)"; \
BASH_CMD="$(which bash 2>/dev/null||command -v bash 2>/dev/null)"; \
[ -x "$BASH_CMD" ] && /usr/local/bin/symlink "$BASH_CMD" "/bin/sh" || true; \
[ -x "$BASH_CMD" ] && /usr/local/bin/symlink "$BASH_CMD" "/usr/bin/sh" || true; \
[ -x "$BASH_CMD" ] && [ "$SH_CMD" != "/bin/sh" ] && /usr/local/bin/symlink "$BASH_CMD" "$SH_CMD" || true; \
[ -x "$BASH_CMD" ] && ln -sf "$BASH_CMD" "/bin/sh" || true; \
[ -x "$BASH_CMD" ] && ln -sf "$BASH_CMD" "/usr/bin/sh" || true; \
[ -x "$BASH_CMD" ] && [ "$SH_CMD" != "/bin/sh" ] && ln -sf "$BASH_CMD" "$SH_CMD" || true; \
[ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true
ENV SHELL="/bin/bash"