---
title: "Run Grafana Agent in static mode in a Docker container | Grafana Agent documentation"
description: "Learn how to run Grafana Agent in static mode in a Docker container"
---

# Run Grafana Agent in static mode in a Docker container

Grafana Agent is available as a Docker container image on the following platforms:

- [Linux containers](#run-a-linux-docker-container) for AMD64 and ARM64.
- [Windows containers](#run-a-windows-docker-container) for AMD64.

## Before you begin

- Install [Docker](https://docker.io) on your computer.
- Create and save a Grafana Agent YAML [configuration file](/docs/agent/v0.43/static/configuration/create-config-file/) on your computer.

## Run a Linux Docker container

To run a Grafana Agent Docker container on Linux, run the following command in a terminal window:

shell ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```shell
docker run \
  -v WAL_DATA_DIRECTORY:/etc/agent/data \
  -v CONFIG_FILE_PATH:/etc/agent/agent.yaml \
  grafana/agent:v0.43.4
```

Replace `CONFIG_FILE_PATH` with the configuration file path on your Linux host system.

> Note
> 
> For the flags to work correctly, you must expose the paths on your Linux host to the Docker container through a bind mount.

## Run a Windows Docker container

To run a Grafana Agent Docker container on Windows, run the following command in a Windows command prompt:

shell ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```shell
docker run ^
  -v WAL_DATA_DIRECTORY:C:\etc\grafana-agent\data ^
  -v CONFIG_FILE_PATH:C:\etc\grafana-agent ^
  grafana/agent:v0.43.4-windows
```

Replace the following:

- `CONFIG_FILE_PATH`: The configuration file path on your Windows host system.
- `WAL_DATA_DIRECTORY`: the directory used to store your metrics before sending them to Prometheus. Old WAL data is cleaned up every hour and is used for recovery if the process crashes.

> Note
> 
> For the flags to work correctly, you must expose the paths on your Windows host to the Docker container through a bind mount.

## Next steps

- [Start Grafana Agent](/docs/agent/v0.43/static/set-up/start-agent/)
- [Configure Grafana Agent](/docs/agent/v0.43/static/configuration/create-config-file/)
