Update docker files to allow specifying pwsh and from image version (#6835)

Update docker files to allow specifying pwsh and from image version
- Also updated to install security updates when building images
This commit is contained in:
Travis Plunk 2018-05-07 18:01:12 -07:00 committed by GitHub
parent 8f37c920ef
commit f33689b4cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 12 deletions

View file

@ -1,6 +1,7 @@
# Docker image file that describes an Centos7 image with PowerShell installed from Microsoft YUM Repo
ARG FromTag=7
FROM centos:7
FROM centos:${FromTag}
ARG POWERSHELL_VERSION=6.0.2
ARG IMAGE_NAME=microsoft/powershell:centos7
@ -38,7 +39,7 @@ RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo | tee /etc/yum.r
# Install latest powershell from Microsoft YUM Repo
RUN yum install -y \
powershell \
powershell-${POWERSHELL_VERSION} \
&& yum clean all
# Use PowerShell as the default shell

View file

@ -1,6 +1,7 @@
# Docker image file that describes an fedora 25 image with PowerShell installed from Microsoft YUM Repo
ARG FromTag=26
FROM fedora:26
FROM fedora:${FromTag}
ARG POWERSHELL_VERSION=6.0.2
ARG IMAGE_NAME=microsoft/powershell:fedora26
@ -38,7 +39,7 @@ RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG
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 dnf install -y powershell \
RUN dnf install -y powershell-${POWERSHELL_VERSION} \
&& dnf clean all
# Use array to avoid Docker prepending /bin/sh -c

View file

@ -1,6 +1,7 @@
# Docker image file that describes an fedora 27 image with PowerShell installed from Microsoft YUM Repo
ARG FromTag=27
FROM fedora:27
FROM fedora:${FromTag}
ARG POWERSHELL_VERSION=6.0.2
ARG IMAGE_NAME=microsoft/powershell:fedora27
@ -39,7 +40,7 @@ RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG
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 dnf install -y powershell \
RUN dnf install -y powershell-${POWERSHELL_VERSION}} \
&& dnf clean all
# Use array to avoid Docker prepending /bin/sh -c

View file

@ -1,6 +1,7 @@
# Docker image file that describes an OpenSUSE 42.2 image with PowerShell installed from PowerShell Release
ARG FromTag=42.2
FROM opensuse:42.2
FROM opensuse:${FromTag}
ARG POWERSHELL_VERSION=6.0.2
ARG POWERSHELL_PACKAGE=powershell-6.0.2-linux-x64.tar.gz

View file

@ -1,8 +1,10 @@
# Docker image file that describes an Ubuntu14.04 image with PowerShell installed from Microsoft APT Repo
ARG FromTag=14.04
FROM ubuntu:trusty
FROM ubuntu:${FromTag}
ARG POWERSHELL_VERSION=6.0.2
ARG POWERSHELL_VERSION_POSTFIX=-1.ubuntu.14.04
ARG IMAGE_NAME=microsoft/powershell:ubuntu14.04
LABEL maintainer="PowerShell Team <powershellteam@hotmail.com>" \
@ -34,6 +36,8 @@ RUN apt-get update \
ca-certificates \
curl \
apt-transport-https \
&& apt-get dist-upgrade -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Import the public repository GPG keys for Microsoft
@ -45,7 +49,9 @@ RUN curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | tee /etc
# Install powershell from Microsoft Repo
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
powershell
powershell=${POWERSHELL_VERSION}${POWERSHELL_VERSION_POSTFIX} \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Use PowerShell as the default shell
# Use array to avoid Docker prepending /bin/sh -c

View file

@ -1,8 +1,10 @@
# Docker image file that describes an Ubuntu16.04 image with PowerShell installed from Microsoft APT Repo
ARG FromTag=16.04
FROM ubuntu:xenial
FROM ubuntu:${FromTag}
ARG POWERSHELL_VERSION=6.0.2
ARG POWERSHELL_VERSION_POSTFIX=-1.ubuntu.16.04
ARG IMAGE_NAME=microsoft/powershell:ubuntu16.04
LABEL maintainer="PowerShell Team <powershellteam@hotmail.com>" \
@ -29,7 +31,9 @@ RUN apt-get update \
ca-certificates \
curl \
apt-transport-https \
locales\
locales \
&& apt-get dist-upgrade -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Setup the locale
@ -46,7 +50,9 @@ RUN curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | tee /etc
# Install powershell from Microsoft Repo
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
powershell
powershell=${POWERSHELL_VERSION}${POWERSHELL_VERSION_POSTFIX} \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Use PowerShell as the default shell
# Use array to avoid Docker prepending /bin/sh -c