diff --git a/docker/release/centos7/Dockerfile b/docker/release/centos7/Dockerfile index 8cddbc696d..6804f460aa 100644 --- a/docker/release/centos7/Dockerfile +++ b/docker/release/centos7/Dockerfile @@ -1,8 +1,7 @@ -FROM centos:7 -MAINTAINER Andrew Schwartzmeyer +# Docker image file that describes an Centos7 image with PowerShell installed from Microsoft YUM Repo -ARG POWERSHELL_RELEASE=v6.0.0-alpha.16 -ARG POWERSHELL_PACKAGE=powershell-6.0.0_alpha.16-1.el7.centos.x86_64.rpm +FROM centos:7 +MAINTAINER Raghu Shantha # Setup the locale ENV LANG en_US.UTF-8 @@ -10,27 +9,17 @@ ENV LC_ALL $LANG RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG # Install dependencies and clean up -RUN yum install -y \ - glibc \ - libcurl \ - ca-certificates \ - libgcc \ - libicu \ - openssl \ - libstdc++ \ - ncurses-base \ - libunwind \ - uuid \ - zlib \ - which \ +RUN yum install -y \ curl \ - git \ && yum clean all -# Install PowerShell package and clean up -RUN curl -SLO https://github.com/PowerShell/PowerShell/releases/download/$POWERSHELL_RELEASE/$POWERSHELL_PACKAGE \ - && yum install -y $POWERSHELL_PACKAGE \ - && rm $POWERSHELL_PACKAGE +# Download and configure Microsoft Repository config file +RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo | tee /etc/yum.repos.d/microsoft.repo +# Install latest powershell from Microsoft YUM Repo +RUN yum install -y \ + powershell + +# Use PowerShell as the default shell # Use array to avoid Docker prepending /bin/sh -c -ENTRYPOINT [ "powershell" ] +ENTRYPOINT [ "powershell" ] \ No newline at end of file diff --git a/docker/release/ubuntu14.04/Dockerfile b/docker/release/ubuntu14.04/Dockerfile index c11136b068..045f0d5e9e 100644 --- a/docker/release/ubuntu14.04/Dockerfile +++ b/docker/release/ubuntu14.04/Dockerfile @@ -1,8 +1,7 @@ -FROM ubuntu:trusty -MAINTAINER Andrew Schwartzmeyer +# Docker image file that describes an Ubuntu14.04 image with PowerShell installed from Microsoft APT Repo -ARG POWERSHELL_RELEASE=v6.0.0-alpha.16 -ARG POWERSHELL_PACKAGE=powershell_6.0.0-alpha.16-1ubuntu1.14.04.1_amd64.deb +FROM ubuntu:trusty +MAINTAINER Raghu Shantha # Setup the locale ENV LANG en_US.UTF-8 @@ -12,25 +11,23 @@ RUN locale-gen $LANG && update-locale # Install dependencies and clean up RUN apt-get update \ && apt-get install -y --no-install-recommends \ - libc6 \ - libcurl3 \ + apt-utils \ ca-certificates \ - libgcc1 \ - libicu52 \ - libssl1.0.0 \ - libstdc++6 \ - libtinfo5 \ - libunwind8 \ - libuuid1 \ - zlib1g \ curl \ - git \ + apt-transport-https \ && rm -rf /var/lib/apt/lists/* -# Install PowerShell package and clean up -RUN curl -SLO https://github.com/PowerShell/PowerShell/releases/download/$POWERSHELL_RELEASE/$POWERSHELL_PACKAGE \ - && dpkg -i $POWERSHELL_PACKAGE \ - && rm $POWERSHELL_PACKAGE +# Import the public repository GPG keys for Microsoft +RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - + +# Register the Microsoft Ubuntu 14.04 repository +RUN curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | tee /etc/apt/sources.list.d/microsoft.list +# Install powershell from Microsoft Repo +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + powershell + +# Use PowerShell as the default shell # Use array to avoid Docker prepending /bin/sh -c -ENTRYPOINT [ "powershell" ] +ENTRYPOINT [ "powershell" ] \ No newline at end of file diff --git a/docker/release/ubuntu16.04/Dockerfile b/docker/release/ubuntu16.04/Dockerfile index b43c8f5b01..2c220c463d 100644 --- a/docker/release/ubuntu16.04/Dockerfile +++ b/docker/release/ubuntu16.04/Dockerfile @@ -1,8 +1,7 @@ -FROM ubuntu:xenial -MAINTAINER Andrew Schwartzmeyer +# Docker image file that describes an Ubuntu16.04 image with PowerShell installed from Microsoft APT Repo -ARG POWERSHELL_RELEASE=v6.0.0-alpha.16 -ARG POWERSHELL_PACKAGE=powershell_6.0.0-alpha.16-1ubuntu1.16.04.1_amd64.deb +FROM ubuntu:xenial +MAINTAINER Raghu Shantha # Setup the locale ENV LANG en_US.UTF-8 @@ -12,25 +11,23 @@ RUN locale-gen $LANG && update-locale # Install dependencies and clean up RUN apt-get update \ && apt-get install -y --no-install-recommends \ - libc6 \ - libcurl3 \ + apt-utils \ ca-certificates \ - libgcc1 \ - libicu55 \ - libssl1.0.0 \ - libstdc++6 \ - libtinfo5 \ - libunwind8 \ - libuuid1 \ - zlib1g \ curl \ - git \ + apt-transport-https \ && rm -rf /var/lib/apt/lists/* + +# Import the public repository GPG keys for Microsoft +RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - + +# Register the Microsoft Ubuntu 16.04 repository +RUN curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | tee /etc/apt/sources.list.d/microsoft.list -# Install PowerShell package and clean up -RUN curl -SLO https://github.com/PowerShell/PowerShell/releases/download/$POWERSHELL_RELEASE/$POWERSHELL_PACKAGE \ - && dpkg -i $POWERSHELL_PACKAGE \ - && rm $POWERSHELL_PACKAGE +# Install powershell from Microsoft Repo +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + powershell +# Use PowerShell as the default shell # Use array to avoid Docker prepending /bin/sh -c -ENTRYPOINT [ "powershell" ] +ENTRYPOINT [ "powershell" ] \ No newline at end of file