File tree Expand file tree Collapse file tree 3 files changed +11
-13
lines changed
Expand file tree Collapse file tree 3 files changed +11
-13
lines changed Original file line number Diff line number Diff line change 11# --platform linux/amd64
22FROM debian:bullseye-slim
33
4- # Define build argument for the module version
5- ARG PNP_VERSION=""
6-
74# Install dependencies
85RUN 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
2120ENTRYPOINT ["pwsh" ]
Original file line number Diff line number Diff line change 11# --platform linux/arm64/v8
22FROM debian:bullseye-slim
33
4- # Define build argument for the module version
5- ARG PNP_VERSION=""
6-
74# Install dependencies
85RUN 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
2120ENTRYPOINT ["pwsh" ]
Original file line number Diff line number Diff line change 11FROM mcr.microsoft.com/windows/nanoserver:ltsc2025
22
3- # Define build argument for the module version
4- ARG PNP_VERSION=""
5-
63RUN mkdir C:\\ pwsh
74WORKDIR C:\\ pwsh
85
@@ -14,8 +11,11 @@ RUN del pwsh.zip
1411# Add PowerShell to PATH
1512ENV 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
2121CMD ["pwsh" ]
You can’t perform that action at this time.
0 commit comments