-
-
Save pcgeek86/2b869c0b6e93c907785c57d182b4bcd0 to your computer and use it in GitHub Desktop.
MSDN Channel 9: Dockerfile to create Docker image for PowerShell Core & .NET Core on CentOS 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:centos7 | |
MAINTAINER Trevor Sullivan <trevor@artofshell.com> | |
ENV PSFolder /powershell | |
RUN yum --assumeyes install libunwind libicu \ | |
&& curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=809131 \ | |
&& mkdir -p /opt/dotnet && tar zxf dotnet.tar.gz -C /opt/dotnet \ | |
&& ln -s /opt/dotnet/dotnet /usr/local/bin \ | |
&& rm dotnet.tar.gz \ | |
&& mkdir $PSFolder | |
WORKDIR $PSFolder | |
ENV POWERSHELL_DOWNLOAD_URL https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm | |
RUN curl -L $POWERSHELL_DOWNLOAD_URL --output powershell.rpm \ | |
&& rpm --upgrade -vh powershell.rpm \ | |
&& rm powershell.rpm | |
ENTRYPOINT ["powershell"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment