> ## Documentation Index
> Fetch the complete documentation index at: https://buildcharts.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Use buildx history

> Inspect BuildCharts runs, replay logs, and debug builds with docker buildx history.

`docker buildx history` is one of the best ways to troubleshoot a BuildCharts build after `docker buildx bake` has finished.

BuildCharts already leans on this data:

* `buildcharts summary` reads the latest Buildx history
* Buildx history records let you inspect completed builds without rerunning them immediately

## When to use it

Use `buildx history` when you need to:

* See which build record failed
* Inspect build metadata and outputs
* Print full step logs again
* Open a build record in Docker Desktop
* Import a `.dockerbuild` artifact from CI into Docker Desktop

## List recent builds

List completed build records for the active builder:

```bash theme={"theme":{"light":"plastic","dark":"plastic"}}
docker buildx history ls
```

Useful variants:

```bash theme={"theme":{"light":"plastic","dark":"plastic"}}
docker buildx history ls --local
docker buildx history ls --filter status=error
docker buildx history ls --no-trunc
```

This helps you find the build ID you want to inspect.

## Inspect a build record

Once you have a build ID, inspect it:

```bash theme={"theme":{"light":"plastic","dark":"plastic"}}
docker buildx history inspect <BUILD_ID>
```

You can also inspect the most recent build by omitting the ID:

```bash theme={"theme":{"light":"plastic","dark":"plastic"}}
docker buildx history inspect
```

Or use a relative offset such as `^1` for the previous build:

```bash theme={"theme":{"light":"plastic","dark":"plastic"}}
docker buildx history inspect ^1
```

Inspection is useful for checking status, duration, inputs, platforms, outputs, and attached artifacts.

## Replay build logs

To print the logs of a completed build:

```bash theme={"theme":{"light":"plastic","dark":"plastic"}}
docker buildx history logs <BUILD_ID>
```

**Example**

```bash theme={"theme":{"light":"plastic","dark":"plastic"}}
docker buildx history logs
docker buildx history logs ^1
docker buildx history logs ^1 --progress rawjson
```

This is the fastest way to revisit step output after a Bake run has already finished.

## Open the build in Docker Desktop

If you use Docker Desktop, open a build record in the Builds UI:

```bash theme={"theme":{"light":"plastic","dark":"plastic"}}
docker buildx history open <BUILD_ID>
```

You can also open the latest build directly:

```bash theme={"theme":{"light":"plastic","dark":"plastic"}}
docker buildx history open
```

This provides a visual view of logs, dependencies, artifacts, and traces.

## Import a CI build into Docker Desktop

If your CI system exports a `.dockerbuild` bundle, you can import it locally:

```bash theme={"theme":{"light":"plastic","dark":"plastic"}}
docker buildx history import --file ./artifacts/buildcharts.dockerbuild
```

That gives you local access to the imported record in Docker Desktop for debugging.

This fits well with BuildCharts because `buildcharts summary` exports:

```text theme={"theme":{"light":"plastic","dark":"plastic"}}
.buildcharts/output/buildcharts.dockerbuild
```

## Suggested troubleshooting flow

1. Run `buildcharts generate`.
2. Run `docker buildx bake --file .buildcharts/docker-bake.hcl`.
3. Run `docker buildx history ls` to locate the build record.
4. Run `docker buildx history inspect <BUILD_ID>` for metadata.
5. Run `docker buildx history logs <BUILD_ID>` for full logs.
6. If needed, run `buildcharts summary` to export a BuildCharts summary and `.dockerbuild` artifact.

## Related pages

* [Common issues](/troubleshooting/common-issues)
* [Command-line interface](/cli)
* [Generate](/core-features/generate)
