Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Alpine 3.10 Dockerfile #12911

Merged
merged 1 commit into from
Sep 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions docker/Dockerfile-alpine-3.10
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM mcr.microsoft.com/powershell:alpine-3.10

ARG REPOSITORY=PSGallery
ARG MODULE=Az
ARG CONFIG=config
ARG AZURERM_CONTEXT_SETTINGS=AzureRmContextSettings.json
ARG AZURE=/root/.Azure
ARG VCS_REF="none"
ARG BUILD_DATE=
ARG VERSION=
ARG IMAGE_NAME=mcr.microsoft.com/azure-powershell:${VERSION}-alpine-3.10

ENV AZUREPS_HOST_ENVIRONMENT="dockerImage/${VERSION}-alpine-3.10"

LABEL maintainer="Azure PowerShell Team <[email protected]>" \
readme.md="http://aka.ms/azpsdockerreadme" \
description="This Dockerfile will install the latest release of Azure PowerShell." \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.usage="http://aka.ms/azpsdocker" \
org.label-schema.url="http://aka.ms/azpsdockerreadme" \
org.label-schema.vcs-url="https://github.com/Azure/azure-powershell" \
org.label-schema.name="azure powershell" \
org.label-schema.vendor="Azure PowerShell" \
org.label-schema.version=${VERSION} \
org.label-schema.schema-version="1.0" \
org.label-schema.vcs-ref=${VCS_REF} \
org.label-schema.docker.cmd="docker run --rm ${IMAGE_NAME} pwsh -c '\$PSVERSIONTABLE'" \
org.label-schema.docker.cmd.devel="docker run -it --rm -e 'DebugPreference=Continue' ${IMAGE_NAME} pwsh" \
org.label-schema.docker.cmd.test="currently not available" \
org.label-schema.docker.cmd.help="docker run --rm ${IMAGE_NAME} pwsh -c Get-Help"

# install azure-powershell from PSGallery
RUN pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted

# create AzureRmContextSettings.json before it was generated
COPY ${CONFIG}/${AZURERM_CONTEXT_SETTINGS} ${AZURE}/${AZURERM_CONTEXT_SETTINGS}

CMD [ "pwsh" ]