Running a Prometheus server in a Windows Docker container

Prometheus is a cross-platform application written in Go, so it can run in a Windows container or a Linux container. Like other open source projects, the team publishes a Linux image on Docker Hub, but you need to build your own Windows image. I'm using an existing image that packages Prometheus into a Windows Server 2019 container from the same dockersamples/aspnet-monitoring example on GitHub that I used for the ASP.NET exporter.

The Dockerfile for Prometheus doesn't do anything you haven't already seen plenty of times in this book—it downloads the release file, extracts it, and sets up the runtime environment. The Prometheus server has multiple functions: it runs scheduled jobs ...

Get Docker on Windows - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.