Skip to content

Instantly share code, notes, and snippets.

@zomglings
Created December 1, 2019 18:02
Show Gist options
  • Save zomglings/643e7a263054c02e2caceb3912f82f20 to your computer and use it in GitHub Desktop.
Save zomglings/643e7a263054c02e2caceb3912f82f20 to your computer and use it in GitHub Desktop.
Powershell alpine docker image
FROM alpine:3.10.3
RUN apk add --no-cache \
ca-certificates \
less \
ncurses-terminfo-base \
krb5-libs \
libgcc \
libintl \
libssl1.1 \
libstdc++ \
tzdata \
userspace-rcu \
zlib \
icu-libs \
curl
RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust
RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.0.0-preview.4/powershell-7.0.0-preview.4-linux-alpine-x64.tar.gz \
-o /tmp/powershell.tar.gz && \
mkdir -p /opt/microsoft/powershell/7-preview && \
tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7-preview && \
rm /tmp/powershell.tar.gz && \
chmod +x /opt/microsoft/powershell/7-preview/pwsh && \
ln -s /opt/microsoft/powershell/7-preview/pwsh /usr/bin/pwsh-preview
ENTRYPOINT ["pwsh-preview"]
CMD []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment