Pull the Latest PowerShell Image from Docker Hub and Run in your Ubuntu VM in Azure

In my last post here I have shown you how you can create a PowerShell docker image in your Ubuntu Server in Azure. Today I will show you how you can directly pull the docker image from docker hub.

Picture Credit: Pexels.com

In first Step you need to pull the docker image.

docker pull mcr.microsoft.com/powershell:latest

In the next step you can run the container in interactive mode.

docker run \

–name “pwsh-latest” \

–interactive –tty \

mcr.microsoft.com/powershell:latest

Another way

docker run \

–name “powh-az-latest” \

–interactive –tty \

And this is the way you can run the image created in my last post in interactive mode

docker run \

–name “pwsh-az-latest-28th” \

–interactive –tty \

powershell6-az-jan2020

Here you can run a PowerShell HellowWorld.ps1 script in the container.

Add a Comment

Your email address will not be published. Required fields are marked *