fabientschanz/microsoft365dsc

By fabientschanz

Updated about 5 hours ago

Docker images for the Microsoft365DSC PowerShell module

Image
Languages & frameworks
Developer tools
0

776

fabientschanz/microsoft365dsc repository overview

Microsoft365DSC

Docker Pulls Docker Image Size GitHub

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.


TagDockerfileBase OSPurpose
linuxDockerfile.linuxLinuxProduction-ready runtime image
linux-devdockerfile.linux.devLinuxDevelopment image with build/debug tooling
windowsdockerfile.windowsWindows Server CoreProduction-ready runtime image (Windows containers)
windows-devdockerfile.windows.devWindows Server CoreDevelopment 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. The latest tag refers to the last windows production 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.


What is Microsoft365DSC?

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:

  • Exporting a tenant's current configuration as reusable DSC config
  • Detecting configuration drift between environments (e.g., dev vs. prod tenants)
  • Applying a known-good configuration baseline via Start-DscConfiguration
  • Running configuration checks in CI/CD pipelines

This 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.


Quick reference


How to use this image

Pull the image
# 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
Run an interactive PowerShell session
docker run -it --rm fabientschanz/microsoft365dsc:<version>-linux pwsh
# Inside the container
Get-Module Microsoft365DSC -ListAvailable
Mount a local configuration directory

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"
Export a tenant's current configuration
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.


Choosing an image variant

ScenarioRecommended tag
Running/applying DSC configs in production or CIlinux (or windows if your pipeline requires Windows-only cmdlets)
Developing or debugging the module itself, running Pester testslinux-dev / windows-dev
Deploying to a Windows-only environment (e.g. certain on-prem hybrid scenarios)windows
Smallest image size / fastest pullslinux

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.


Versioning

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.


License

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.


Feedback & contributions

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.

Tag summary

Content type

Image

Digest

sha256:d2371c99e

Size

2.8 GB

Last updated

about 5 hours ago

docker pull fabientschanz/microsoft365dsc:windows.dev-nightly