11FROM arm32v7/debian:bookworm-slim
22
3- # Base deps + ICU (needed for .NET/PowerShell on Linux)
3+ # ---- Base deps + ICU (needed for .NET/PowerShell on Linux) ----
44RUN set -eux; \
55 apt-get update; \
66 DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
77 ca-certificates curl tar libicu-dev \
88 && update-ca-certificates \
99 && rm -rf /var/lib/apt/lists/*
1010
11- # Install PowerShell 7.4.2 (ARM32)
11+ # ---- Install PowerShell 7.4.2 (ARM32) ----
1212ARG PWSH_VERSION=7.4.2
1313RUN set -eux; \
1414 curl -sSL -o /tmp/pwsh.tar.gz \
@@ -18,33 +18,33 @@ RUN set -eux; \
1818 ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh; \
1919 rm -f /tmp/pwsh.tar.gz
2020
21- # PnP version to install at first container start (on real ARM32, not QEMU)
22- ARG PNP_VERSION=3.0.0
21+ # ---- PnP.PowerShell version to install at first run ----
22+ ARG PNP_VERSION=3.1.306-nightly
2323ENV PNP_VERSION=${PNP_VERSION} TZ=Etc/UTC
2424
25- # Create a robust entrypoint script
26- # - Installs PnP.PowerShell once on first run (real ARM32 hardware)
27- # - Then execs pwsh, forwarding any arguments
25+ # ---- Write entrypoint script via heredoc (no semicolon/backslash after <<'SH') ----
2826RUN set -eux; \
29- install -d -m 0755 /usr/local/bin; \
30- cat > /usr/local/bin/docker-entrypoint.sh <<'SH' ; \
27+ install -d -m 0755 /usr/local/bin; \
28+ cat > /usr/local/bin/docker-entrypoint.sh <<'SH'
3129# !/bin/sh
3230set -eu
3331
34- # First-run install on real ARM CPU only; avoid QEMU- build crashes
32+ # First-run install on real ARM32 ( avoid QEMU build-time crashes)
3533pwsh -NoLogo -NoProfile -Command "
36- \ $ m = Get-Module -ListAvailable PnP.PowerShell -ErrorAction SilentlyContinue;
37- if (-not \ $ m) {
38- Install-Module PnP.PowerShell -Scope AllUsers -Force -AllowPrerelease -SkipPublisherCheck -RequiredVersion \ $ env:PNP_VERSION;
34+ $m = Get-Module -ListAvailable PnP.PowerShell -ErrorAction SilentlyContinue;
35+ if (-not $m) {
36+ Install-Module PnP.PowerShell -Scope AllUsers -Force -AllowPrerelease -SkipPublisherCheck -RequiredVersion $env:PNP_VERSION;
3937 Write-Host 'PnP.PowerShell installed.';
4038 } else {
4139 Write-Host 'PnP.PowerShell already present.';
4240 }"
43- # Hand off to PowerShell; forward all args
41+ # Hand off to PowerShell; forward all container args
4442exec pwsh -NoLogo "$@"
4543SH
46- chmod +x /usr/local/bin/docker-entrypoint.sh
4744
48- # Use exec-form ENTRYPOINT; CMD can supply default args if you like
45+ # mark executable in a separate RUN (simplest, avoids heredoc chaining quirks)
46+ RUN chmod +x /usr/local/bin/docker-entrypoint.sh
47+
48+ # Use exec-form ENTRYPOINT so signals are delivered to pwsh
4949ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh" ]
5050CMD []
0 commit comments