docker build . -t laidbackware/pwsh:latest docker push laidbackware/pwsh:latest
docker run -it --rm --volume ${PWD}:/local_dir laidbackware/pwsh:latest bash
| FROM ubuntu:20.04 | |
| RUN set -xe \ | |
| && echo "Update the list of packages" \ | |
| && apt-get update \ | |
| && echo "Install pre-requisite packages." \ | |
| && apt-get install -y wget apt-transport-https software-properties-common \ | |
| && echo "Download the Microsoft repository GPG keys" \ | |
| && wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb \ | |
| && echo "Register the Microsoft repository GPG keys" \ | |
| && dpkg -i packages-microsoft-prod.deb \ | |
| && echo "Update the list of products" \ | |
| && apt-get update \ | |
| && echo "Enable the "universe" repositories" \ | |
| && add-apt-repository universe \ | |
| && echo "Install PowerShell" \ | |
| && apt-get install -y powershell | |
| RUN set -xe \ | |
| && pwsh --command 'Install-Module VMware.PowerCLI -Scope CurrentUser -Confirm:$False -Force' |