Skip to content

Commit 9508fee

Browse files
committed
Bringing over Docker container definitions
1 parent cb4a0f8 commit 9508fee

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

docker/linux-amd64.dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# --platform linux/amd64
22
FROM debian:bullseye-slim
33

4-
# Define build argument for the module version
5-
ARG PNP_VERSION=""
6-
74
# Install dependencies
85
RUN apt-get update && apt-get install -y curl libicu67 libssl1.1 libunwind8
96

@@ -16,6 +13,8 @@ RUN curl -L -o powershell.tar.gz https://github.com/PowerShell/PowerShell/releas
1613
&& ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh
1714

1815
# Install PnP.PowerShell module
19-
RUN pwsh -Command "Install-Module -Name PnP.PowerShell -RequiredVersion $env:PNP_VERSION -Force -Scope AllUsers -AllowPrerelease -SkipPublisherCheck"
16+
SHELL ["pwsh", "-command"]
17+
ARG PNP_VERSION
18+
RUN Install-Module -Name PnP.PowerShell -RequiredVersion $env:PNP_VERSION -Force -Scope AllUsers -AllowPrerelease -SkipPublisherCheck
2019

2120
ENTRYPOINT ["pwsh"]

docker/linux-arm64.dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# --platform linux/arm64/v8
22
FROM debian:bullseye-slim
33

4-
# Define build argument for the module version
5-
ARG PNP_VERSION=""
6-
74
# Install dependencies
85
RUN apt-get update && apt-get install -y curl libicu67 libssl1.1 libunwind8
96

@@ -16,6 +13,8 @@ RUN curl -L -o powershell.tar.gz https://github.com/PowerShell/PowerShell/releas
1613
&& ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh
1714

1815
# Install PnP.PowerShell module
19-
RUN pwsh -Command "Install-Module -Name PnP.PowerShell -RequiredVersion $env:PNP_VERSION -Force -Scope AllUsers -AllowPrerelease -SkipPublisherCheck"
16+
SHELL ["pwsh", "-command"]
17+
ARG PNP_VERSION
18+
RUN Install-Module -Name PnP.PowerShell -RequiredVersion $env:PNP_VERSION -Force -Scope AllUsers -AllowPrerelease -SkipPublisherCheck
2019

2120
ENTRYPOINT ["pwsh"]

docker/windows-amd64.dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
FROM mcr.microsoft.com/windows/nanoserver:ltsc2025
22

3-
# Define build argument for the module version
4-
ARG PNP_VERSION=""
5-
63
RUN mkdir C:\\pwsh
74
WORKDIR C:\\pwsh
85

@@ -14,8 +11,11 @@ RUN del pwsh.zip
1411
# Add PowerShell to PATH
1512
ENV PATH="C:\\pwsh;${PATH}"
1613

17-
# Install PnP PowerShell module
18-
RUN pwsh -Command "Install-Module -Name PnP.PowerShell -RequiredVersion $env:PNP_VERSION -Force -Scope CurrentUser"
14+
# Install PnP.PowerShell module
15+
SHELL ["pwsh", "-command"]
16+
ARG PNP_VERSION
17+
USER ContainerAdministrator
18+
RUN Install-Module -Name PnP.PowerShell -RequiredVersion $env:PNP_VERSION -Force -Scope AllUsers -AllowPrerelease -SkipPublisherCheck
1919

2020
# Start PowerShell
2121
CMD ["pwsh"]

0 commit comments

Comments
 (0)