Deploying Prometheus With Docker
Introduction
There are different ways you can use to deploy the Prometheus monitoring tool in your environment. One of the fastest ways to get started is to deploy it as a Docker container. This guide shows you how to quickly set up a minimal Prometheus on your laptop. You can then extend that setup to add a monitoring dashboard, alerting, and authentication.
Deploying Prometheus in a Docker Container
Basic Setup
Running Prometheus in Docker is very simple using this command
docker run -p 9000:9090 prometheus prom/prometheus:v3.0.0
This will pull and run the latest version (as of this writing) of Prometheus. You can access the Prometheus UI at localhost:9000. Note that the container port 9090 is forwarded to the localhost port 9000.