Install dbatools inside the (Ubuntu) container

lunch bash shell within container

docker exec -it dockersql2 /bin/bash


update libraries

apt-get update

Install PowerShell on Linux (Ubuntu)

apt-get install -y powershell

Enter on PowerShell

pwsh

Install dbatools module

Install-Module -Name dbatools