Skip to content

Instantly share code, notes, and snippets.

@pcgeek86 pcgeek86/Dockerfile Secret
Last active Jul 16, 2018

Embed
What would you like to do?
MSDN Channel 9: This is the Dockerfile used to build a PowerShell Core Docker container image on a Linux Docker Host
FROM ubuntu:xenial
MAINTAINER Trevor Sullivan <trevor@artofshell.com>
### Install .NET Core
RUN apt-get update \
&& apt-get install apt-transport-https curl -y \
&& sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list' \
&& apt-get update \
&& apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 \
&& apt-get update \
&& apt-get install dotnet-dev-1.0.0-preview2-003121 -y \
&& mkdir /powershell \
&& apt-get clean
# Install PowerShell
### Set the working directory to /powershell
WORKDIR /powershell
### Set some environment variables
ENV POWERSHELL_DOWNLOAD_URL https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb
RUN curl -SL $POWERSHELL_DOWNLOAD_URL --output powershell.deb \
&& apt-get install libunwind8 libicu55 \
&& dpkg --install powershell.deb \
&& rm powershell.deb \
&& apt-get clean
ENTRYPOINT ["powershell"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.