Found some old code from 2012 on my "cloud".
Decided to use it as base for a toolkit.June 2022
Assumes your container runs Debian.
Setup the base environment
# fetch latest package meta-data
sudo apt update
# fetch necessary utilities
sudo apt install curl
Setup the repositories
# add microsofts gpg keys (important!)
curl https://packages.microsoft.com/keys/microsoft.asc \
| sudo apt-key add -
# add microsofts sources/feeds
sudo echo 'deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main' \
> /etc/apt/sources.list.d/microsoft.list
Setup the package
# fetch latest package meta-data (including the new sources/feeds)
sudo apt update
# fetch and install...
sudo apt install powershell
Read about more methods here...
https://docs.microsoft.com/en-us/powershell/scripting/install/install-debian
CYKO is a free and open-source project distributed under the terms of the MIT License. A short and simple permissive license with conditions only requiring preservation of copyright and license notices.
See the LICENSE file for details.