Skip to content

Commit 87bf6dc

Browse files
authored
Update comments and PnP.PowerShell version in Dockerfile
1 parent b6b206a commit 87bf6dc

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

docker/linux-arm32.dockerfile

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
FROM 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) ----
44
RUN 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) ----
1212
ARG PWSH_VERSION=7.4.2
1313
RUN 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
2323
ENV 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') ----
2826
RUN 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
3230
set -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)
3533
pwsh -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
4442
exec pwsh -NoLogo "$@"
4543
SH
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
4949
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
5050
CMD []

0 commit comments

Comments
 (0)