-
Notifications
You must be signed in to change notification settings - Fork 406
Expand file tree
/
Copy pathlinux-amd64.dockerfile
More file actions
41 lines (32 loc) · 1.09 KB
/
Copy pathlinux-amd64.dockerfile
File metadata and controls
41 lines (32 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# --platform linux/amd64
FROM amd64/alpine
# Install dependencies
RUN apk add --no-cache \
ca-certificates \
less \
ncurses-terminfo-base \
krb5-libs \
libgcc \
libintl \
libssl3 \
libstdc++ \
tzdata \
userspace-rcu \
zlib \
icu-libs \
curl
RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache \
lttng-ust \
openssh-client
# Download and install PowerShell
RUN curl -L -o powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-7.5.4-linux-musl-x64.tar.gz \
&& mkdir -p /opt/microsoft/powershell/7 \
&& tar -xvf powershell.tar.gz -C /opt/microsoft/powershell/7 \
&& rm powershell.tar.gz \
&& chmod +x /opt/microsoft/powershell/7/pwsh \
&& ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh
# Install PnP.PowerShell module
SHELL ["pwsh", "-command"]
ARG PNP_VERSION
RUN Install-Module -Name PnP.PowerShell -RequiredVersion $env:PNP_VERSION -Force -Scope AllUsers -AllowPrerelease -SkipPublisherCheck
ENTRYPOINT ["pwsh"]