microsoft365dsc
Docker images for the Microsoft365DSC PowerShell module
776
Microsoft365DSC is a containerized environment for running the Microsoft365DSC PowerShell module - a Desired State Configuration (DSC) resource kit for managing and monitoring Microsoft 365 tenant configuration as code (Exchange Online, SharePoint Online, Teams, Intune, Azure AD/Entra ID, Security & Compliance, and more).
This image gives you a ready-to-run PowerShell + Microsoft365DSC environment so you don't need to install PowerShell, the module, and its dependencies locally.
Dockerfile links| Tag | Dockerfile | Base OS | Purpose |
|---|---|---|---|
linux | Dockerfile.linux | Linux | Production-ready runtime image |
linux-dev | dockerfile.linux.dev | Linux | Development image with build/debug tooling |
windows | dockerfile.windows | Windows Server Core | Production-ready runtime image (Windows containers) |
windows-dev | dockerfile.windows.dev | Windows Server Core | Development image with build/debug tooling (Windows containers) |
Version-pinned tags are also published, e.g.
1.26.708.1-linux,1.26.708.1-linux-dev,1.26.708.1-windows,1.26.708.1-windows-dev. We recommend pinning to a specific version in production. Thelatesttag refers to the lastwindowsproduction release.
Note on windows tags: these require a Docker daemon running in Windows container mode. If you're on Docker Desktop and your daemon is set to Linux containers (the default), pulling a windows tag will fail - switch container modes first, or use docker run --isolation=process on a supported Windows Server host.
Microsoft365DSC lets you define your Microsoft 365 tenant's configuration declaratively, then compare, drift-detect, and enforce that configuration over time - the same way PowerShell DSC is used for server configuration. Typical uses include:
Start-DscConfigurationThis image packages PowerShell, the Microsoft365DSC module, and its required sub-modules so those workflows run the same way on any host that can run Docker.
docker)# Linux, production
docker pull fabientschanz/microsoft365dsc:<version>-linux
# Linux, development (includes build/test tooling)
docker pull fabientschanz/microsoft365dsc:<version>-linux-dev
# Windows, production
docker pull fabientschanz/microsoft365dsc:<version>-windows
# or use the 'latest' tag
docker pull fabientschanz/microsoft365dsc:latest
# Windows, development
docker pull fabientschanz/microsoft365dsc:<version>-windows-dev
docker run -it --rm fabientschanz/microsoft365dsc:<version>-linux pwsh
# Inside the container
Get-Module Microsoft365DSC -ListAvailable
If you keep your DSC .ps1 configuration scripts on the host, mount them into the container so you can run/apply them without rebuilding the image:
docker run -it --rm \
-v "$(pwd)/configs:/configs" \
fabientschanz/microsoft365dsc:<version>-linux \
pwsh -Command "/configs/MyTenantConfig.ps1"
On Windows containers:
docker run -it --rm `
-v ${PWD}\configs:C:\configs `
fabientschanz/microsoft365dsc:<version>-windows `
pwsh -Command "C:\configs\MyTenantConfig.ps1"
docker run -it --rm \
-v "$(pwd)/export:/export" \
fabientschanz/microsoft365dsc:<version>-linux \
pwsh -Command "Export-M365DSCConfiguration -Components @('AADApplication') -Path /export"
Authenticate using whichever method fits your scenario (interactive login, app registration with certificate, or managed identity) - see the Microsoft365DSC authentication docs for details. Avoid baking credentials into the image; pass them at runtime via environment variables, mounted secret files, or your orchestrator's secrets manager.
| Scenario | Recommended tag |
|---|---|
| Running/applying DSC configs in production or CI | linux (or windows if your pipeline requires Windows-only cmdlets) |
| Developing or debugging the module itself, running Pester tests | linux-dev / windows-dev |
| Deploying to a Windows-only environment (e.g. certain on-prem hybrid scenarios) | windows |
| Smallest image size / fastest pulls | linux |
The -dev variants include extra tooling (test frameworks, linters, build dependencies) and are larger than the production images - they are not intended for production deployment.
Image tags track Microsoft365DSC module releases on PowerShell Gallery. A new set of four images (linux, linux-dev, windows, windows-dev) is published for each module release, alongside a floating latest/windows tag pointing at the most recent stable build.
This image is provided under the MIT License, consistent with the Microsoft365DSC module itself. Some base images may carry their own licensing terms (e.g., Windows Server Core base images) - review those separately before redistribution.
Issues, feature requests, and contributions are welcome on the Microsoft365DSC GitHub repository. Please include the image tag and docker version/docker info output when reporting container-specific issues.
Content type
Image
Digest
sha256:d2371c99e…
Size
2.8 GB
Last updated
about 5 hours ago
docker pull fabientschanz/microsoft365dsc:windows.dev-nightly