Exports hardware- and OS-level metrics from a host for scraping by Prometheus.
Pull the latest version of this image from the Ghost registry. Pulling requires authentication — generate a token and run docker login first (see Authentication below).
The Ghost catalog is public to browse, but pulling images requires an account. Generate a pull token below (or from your Account → Tokens page) — you'll get a ready-to-paste docker login command, then docker pull works.
The username is generated automatically (it looks like robot$<project>+<auto-id>, not the name you typed) and is included in the docker login command above. The secret is shown only once when you create the token.
All Ghost images are signed with cosign. Verifying the signature before deployment ensures the image has not been tampered with.
Install cosign via brew install cosign or download from the Sigstore releases page.
Reference this image in your Dockerfile as a base layer:
All examples in this guide use the public image. If you've mirrored the repository for your own use (for example, to your Docker Hub namespace), update your commands to reference the mirrored image instead of the public one.
For example:
registry.ghost-prod.alphabravo.io/ghost-base/<repository>:<tag><your-namespace>/dhi-<repository>:<tag>For the examples, you must first use docker login registry.ghost-prod.alphabravo.io to authenticate to the registry to pull the images.
node_exporter is a Prometheus exporter that exposes a wide range of hardware- and OS-level metrics for *NIX systems. It's typically deployed as a DaemonSet in Kubernetes (one pod per node) or as a host-level process or container on bare-metal Linux servers, and scraped by Prometheus on port 9100.
This Docker Hardened image ships the production node_exporter binary as the container entrypoint. The image is
configured entirely via command-line flags — no environment variables or configuration files are required. TCP port 9100
is exposed by default for metrics scraping.
For the following examples, replace <tag> with the image variant you want to run. To confirm the correct namespace and
repository name of the mirrored repository, select .
Run node-exporter with its default flags and publish port 9100 so Prometheus (or any client) can scrape it:
$ docker run -d --name node-exporter -p 9100:9100 \
registry.ghost-prod.alphabravo.io/ghost-base/node-exporter:<tag>
Verify it's serving metrics:
$ curl http://localhost:9100/metrics | head -5
This runs node-exporter with the default set of enabled collectors, inspecting the container's own cgroup and namespace view. To gather metrics about the underlying host instead, see Monitor the host below.
To collect host-level metrics, node_exporter must access host namespaces and the host filesystem. On bare-metal Linux, run the container with host networking, host PID namespace, and a bind mount of the host root filesystem:
$ docker run -d --name node-exporter \
--net=host --pid=host \
-v "/:/host:ro,rslave" \
registry.ghost-prod.alphabravo.io/ghost-base/node-exporter:<tag> \
--path.rootfs=/host
Once running, Prometheus (or any scrape client) can reach the exporter at http://<host>:9100/metrics. The
--path.rootfs=/host flag tells node-exporter where the host filesystem is mounted inside the container so it can
report correct paths and device names.
Docker Desktop note. The command above is written for bare-metal Linux. On Docker Desktop for Mac and Windows it has two known differences:
- The
rslavemount propagation flag fails withpath / is mounted on / but it is not a shared or slave mount. Droprslaveand use-v "/:/host:ro"instead.--net=hostbinds to the Docker Desktop Linux VM's network, not the host OS. Metrics are unreachable fromcurl localhost:9100on the Mac/Windows host; they can only be reached from inside another container on the same host network.- "Host" metrics describe the Docker Desktop Linux VM (filesystems like
/dev/vda1and/run/host_virtiofs/*), not the Mac or Windows host. For monitoring Docker Desktop development environments, this is often still useful, but it is not equivalent to bare-metal host monitoring.
If you only need the exporter to expose metrics for the container itself (for example, to verify the image, run it in CI, or scrape the runtime environment), run it with a simple port mapping and no host mounts:
$ docker run -d --name node-exporter -p 9100:9100 \
registry.ghost-prod.alphabravo.io/ghost-base/node-exporter:<tag>
This is the safest configuration when you do not have permission to expose host namespaces to the container.
services:
node-exporter:
image: registry.ghost-prod.alphabravo.io/ghost-base/node-exporter:<tag>
container_name: node-exporter
network_mode: host
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro'
command:
- '--path.rootfs=/host'
As with the docker run host-monitoring example, this is written for bare-metal Linux. On Docker Desktop drop any
rslave propagation flag; with the form shown above the service will start correctly.
Deploy node-exporter as a DaemonSet so Kubernetes schedules one pod per node. Each pod uses hostNetwork, hostPID,
and a hostPath volume mounted at /host to read from the node's root filesystem. The imagePullSecrets field
references a pull secret you must create first for registry.ghost-prod.alphabravo.io — see
DHI authentication in Kubernetes.
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: node-exporter
spec:
selector:
matchLabels:
name: node-exporter
template:
metadata:
labels:
name: node-exporter
spec:
hostNetwork: true
hostPID: true
imagePullSecrets:
- name: helm-pull-secret
containers:
- name: node-exporter
image: registry.ghost-prod.alphabravo.io/ghost-base/node-exporter:<tag>
args:
- "--path.rootfs=/host"
ports:
- name: metrics
containerPort: 9100
hostPort: 9100
volumeMounts:
- name: host-root
mountPath: /host
readOnly: true
volumes:
- name: host-root
hostPath:
path: /
With this DaemonSet applied to a cluster, Prometheus can scrape each node at http://<node-ip>:9100/metrics. Emitted
metrics describe each Kubernetes node (node_uname_info{nodename="…"}, filesystem and disk stats per node, per-CPU
usage, etc.), which is the standard host-monitoring pattern for Kubernetes.
node_exporter has many runtime flags. Common ones:
| Flag | Description | Default |
|---|---|---|
--web.listen-address | Address and port to listen on for metrics | :9100 |
--path.rootfs | Prefix for host filesystem paths when bind-mounted | (empty) |
--collector.<name> / --no-collector.<name> | Enable or disable individual collectors | varies |
--web.telemetry-path | URL path for the metrics endpoint | /metrics |
Example: run with a custom listen port, disable the filesystem collector, and serve metrics at a non-default path:
$ docker run -d --name node-exporter -p 9180:9180 \
registry.ghost-prod.alphabravo.io/ghost-base/node-exporter:<tag> \
--web.listen-address=":9180" \
--no-collector.filesystem \
--web.telemetry-path=/node-metrics
For the full list of flags and collectors, run the image with --help:
$ docker run --rm registry.ghost-prod.alphabravo.io/ghost-base/node-exporter:<tag> --help
Add node-exporter as a scrape target in your Prometheus config:
scrape_configs:
- job_name: 'node_exporter'
static_configs:
- targets: ['<node-hostname-or-ip>:9100']
For Kubernetes deployments, the upstream Prometheus community Helm charts and the ServiceMonitor pattern via the
Prometheus Operator both handle DaemonSet-based node-exporter scraping automatically.
| Feature | Docker Official node-exporter | Docker Hardened node-exporter |
|---|---|---|
| Security | Standard base with common utilities | Minimal, hardened Debian 13 base |
| Shell access | Full shell available | No shell in runtime variants |
| Package manager | apk / apt available | No package manager in runtime variants |
| User | Runs as nobody (UID 65534) or root | Runs as nonroot user (UID 65532) |
| Attack surface | Larger due to additional utilities | Minimal — binary only, no other tools |
| Debugging | Traditional shell debugging | Use Docker Debug or Image Mount for troubleshooting |
| Compliance | None | CIS; FIPS 140-3 and STIG in FIPS variants |
| Attestations | None | SBOM, provenance, VEX metadata |
Ghost hardened images prioritize security through minimalism:
The hardened image contains only the node_exporter binary and its required libraries — no shell, no coreutils, no
package manager, no editors. Common debugging methods for applications built with Ghost hardened images include:
Docker Debug provides a shell, common debugging tools, and lets you install other tools in an ephemeral, writable layer that only exists during the debugging session. For example:
$ docker debug node-exporter
Or mount debugging tools with the Image Mount feature:
$ docker run --rm -it --pid container:node-exporter \
--mount=type=image,source=registry.ghost-prod.alphabravo.io/ghost-base/busybox:1,destination=/dbg,ro \
--entrypoint /dbg/bin/sh \
registry.ghost-prod.alphabravo.io/ghost-base/node-exporter:<tag>
For operational visibility without attaching a debugger, the /metrics endpoint itself exposes Go runtime metrics
(go_*), process metrics (process_*), and node-exporter's own scrape metrics (node_scrape_collector_*).
Ghost hardened images come in different variants depending on their intended use.
Runtime variants are designed to run your application in production. These images are intended to be used either
directly or as the FROM image in the final stage of a multi-stage build. These images typically:
Build-time variants include dev in the variant name and are intended for use in the first stage of a multi-stage
Dockerfile. These images typically:
The node-exporter image is published in the following variant combinations:
| Variant | Tag pattern | User | Compliance | Availability |
|---|---|---|---|---|
| Runtime | <version>, <version>-debian13 | nonroot | CIS | Public |
| Build-time (dev) | <version>-dev, <version>-debian13-dev | root | CIS | Public |
| Runtime + FIPS | <version>-fips, <version>-debian13-fips | nonroot | CIS, FIPS, STIG | Subscription only |
| Build-time + FIPS | <version>-fips-dev, <version>-debian13-fips-dev | root | CIS, FIPS, STIG | Subscription only |
Alpine 3.23 variants are also published with tag patterns <version>-alpine3.23, <version>-alpine3.23-fips, etc.
To view all published tags and get more information about each variant, select the Tags tab for this repository.
FIPS variants include fips in the variant name and tag. They come in both runtime and build-time variants. These
variants use cryptographic modules that have been validated under FIPS 140, a U.S. government standard for secure
cryptographic operations.
The node-exporter FIPS variants are available through DHI Select and DHI Enterprise subscriptions only. To use them, mirror the repository into your own namespace and pull from your mirror. See Mirror a DHI repository.
FIPS variants of the node-exporter image are drop-in replacements for the standard runtime variant — same entrypoint,
same port, same nonroot UID 65532. node_exporter does not require any FIPS-specific configuration flags. All TLS
operations (if enabled via --web.tls-cert-file and --web.tls-key-file) automatically use the FIPS-validated
cryptographic providers.
FIPS variants include a signed FIPS attestation listing the cryptographic modules in the image and their validation status. Retrieve it with Docker Scout against your mirrored repository:
$ docker scout attest get \
--predicate-type https://docker.com/dhi/fips/v0.1 \
--predicate \
<your-namespace>/dhi-node-exporter:<version>-fips
Compared to the standard runtime variant:
com.docker.dhi.compliance=fips,stig,cisFIPS variants are appropriate for regulated environments such as FedRAMP, government, healthcare, financial services, and defense deployments.
To migrate your node-exporter deployment to a Ghost hardened image, update the image reference in your Dockerfile, Compose file, or Kubernetes manifests. The following table lists the most common changes:
| Item | Migration note |
|---|---|
| Base image | Replace your base image with registry.ghost-prod.alphabravo.io/ghost-base/node-exporter:<tag>. |
| Package management | Non-dev images, intended for runtime, don't contain package managers. Use package managers only in images with a dev tag. |
| Non-root user | By default, non-dev images, intended for runtime, run as the nonroot user (UID 65532). Ensure that any bind-mounted paths the exporter reads are accessible. |
| Multi-stage build | Utilize images with a dev tag for build stages and non-dev images for runtime. |
| TLS certificates | Ghost hardened images contain standard TLS certificates by default. There is no need to install TLS certificates. |
| Ports | Non-dev hardened images run as a nonroot user by default. node_exporter's default port 9100 is above 1024 and is unaffected. Custom --web.listen-address values should also use ports above 1024. |
| Entry point | Ghost hardened images may have different entry points than images such as Docker Official Images. The entry point for this image is node_exporter (on PATH) with no default CMD — pass flags as arguments to docker run or in your args: in Kubernetes. |
| No shell | By default, non-dev images, intended for runtime, don't contain a shell. Use dev images in build stages to run shell commands and then copy artifacts to the runtime stage. |
| Image pull secret | For Kubernetes deployments, create a pull secret for registry.ghost-prod.alphabravo.io and reference it in the pod spec's imagePullSecrets. DHI images require authentication for cluster pulls. |
The following steps outline the general migration process.
Find hardened images for your app.
A hardened image may have several variants. Inspect the image tags and find the image variant that meets your needs.
Update the base image in your Dockerfile.
Update the base image in your application's Dockerfile to the hardened image you found in the previous step.
For multi-stage Dockerfiles, update the runtime image in your Dockerfile.
To ensure that your final image is as minimal as possible, you should use a multi-stage build. All stages in your
Dockerfile should use a hardened image. While intermediary stages will typically use images tagged as dev, your
final runtime stage should use a non-dev image variant.
Install additional packages.
Ghost hardened images contain minimal packages in order to reduce the potential attack surface. You may need to install additional packages in your Dockerfile. Inspect the image variants to identify which packages are already installed.
Only images tagged as dev typically have package managers. You should use a multi-stage Dockerfile to install the
packages. Install the packages in the build stage that uses a dev image. Then, if needed, copy any necessary
artifacts to the runtime stage that uses a non-dev image.
For Alpine-based images, you can use apk to install packages. For Debian-based images, you can use apt-get to
install packages.
The following are common issues that you may encounter during migration.
The hardened images intended for runtime don't contain a shell nor any tools for debugging. The recommended method for debugging applications built with Ghost hardened images is to use Docker Debug to attach to these containers. Docker Debug provides a shell, common debugging tools, and lets you install other tools in an ephemeral, writable layer that only exists during the debugging session.
For node-exporter specifically, most operational troubleshooting can be done through the exporter's own output:
http://<host>:9100/metrics and inspect the node_scrape_collector_* metrics for per-collector scrape
duration and success counts--log.level=debug for verbose collector activityBy default image variants intended for runtime, run as the nonroot user (UID 65532). Ensure that necessary files and directories are accessible to the nonroot user.
For host monitoring, the bind-mounted root filesystem is typically mounted read-only (/:/host:ro), so UID permissions
on the host don't need to match. However, some collectors read from paths that require additional privileges or
capabilities:
timex collector may require --cap-add=SYS_TIME on certain hosts--pid=hostdiskstats collector may log warnings about /run/udev/data on systems where udev isn't accessible; the
collector continues to work with reduced device metadataNon-dev hardened images run as a nonroot user by default. As a result, applications in these images can't bind to
privileged ports (below 1024) when running in Kubernetes or in Docker Engine versions older than 20.10. node_exporter's
default port 9100 is above 1024 and is unaffected. If you configure a custom --web.listen-address, use a port above
1024.
By default, image variants intended for runtime don't contain a shell. Use dev images in build stages to run shell
commands and then copy any necessary artifacts into the runtime stage. In addition, use Docker Debug to debug containers
with no shell.
Ghost hardened images may have different entry points than images such as Docker Official Images. Use docker inspect
to inspect entry points for Ghost hardened images and update your Dockerfile if necessary.