command: docker buildx history ls
short: List build records
long: |-
    List completed builds recorded by the active builder. Each entry includes the
    build ID, name, status, timestamp, and duration.

    By default, only records for the current builder are shown. You can filter
    results using flags.
usage: docker buildx history ls [OPTIONS]
pname: docker buildx history
plink: docker_buildx_history.yaml
options:
    - option: filter
      value_type: stringArray
      default_value: '[]'
      description: Provide filter values (e.g., `status=error`)
      details_url: '#filter'
      deprecated: false
      hidden: false
      experimental: false
      experimentalcli: false
      kubernetes: false
      swarm: false
    - option: format
      value_type: string
      default_value: table
      description: Format the output
      details_url: '#format'
      deprecated: false
      hidden: false
      experimental: false
      experimentalcli: false
      kubernetes: false
      swarm: false
    - option: local
      value_type: bool
      default_value: "false"
      description: List records for current repository only
      details_url: '#local'
      deprecated: false
      hidden: false
      experimental: false
      experimentalcli: false
      kubernetes: false
      swarm: false
    - option: no-trunc
      value_type: bool
      default_value: "false"
      description: Don't truncate output
      details_url: '#no-trunc'
      deprecated: false
      hidden: false
      experimental: false
      experimentalcli: false
      kubernetes: false
      swarm: false
inherited_options:
    - option: builder
      value_type: string
      description: Override the configured builder instance
      deprecated: false
      hidden: false
      experimental: false
      experimentalcli: false
      kubernetes: false
      swarm: false
    - option: debug
      shorthand: D
      value_type: bool
      default_value: "false"
      description: Enable debug logging
      deprecated: false
      hidden: false
      experimental: false
      experimentalcli: false
      kubernetes: false
      swarm: false
examples: |-
    ### List all build records for the current builder

    ```console
    $ docker buildx history ls
    BUILD ID                    NAME           STATUS     CREATED AT        DURATION
    qu2gsuo8ejqrwdfii23xkkckt   .dev/2850      Completed  3 days ago        1.4s
    qsiifiuf1ad9pa9qvppc0z1l3   .dev/2850      Completed  3 days ago        1.3s
    g9808bwrjrlkbhdamxklx660b   .dev/3120      Completed  5 days ago        2.1s
    ```

    ### List failed builds (--filter) {#filter}

    ```console
    docker buildx history ls --filter status=error
    ```

    You can filter the list using the `--filter` flag. Supported filters include:

    | Filter                                 | Supported comparisons                            | Example                    |
    |:---------------------------------------|:-------------------------------------------------|:---------------------------|
    | `ref`, `repository`, `status`          | Support `=` and `!=` comparisons                 | `--filter status!=success` |
    | `startedAt`, `completedAt`, `duration` | Support `<` and `>` comparisons with time values | `--filter duration>30s`    |

    You can combine multiple filters by repeating the `--filter` flag:

    ```console
    docker buildx history ls --filter status=error --filter duration>30s
    ```

    ### List builds from the current project (--local) {#local}

    ```console
    docker buildx history ls --local
    ```

    ### Display full output without truncation (--no-trunc) {#no-trunc}

    ```console
    docker buildx history ls --no-trunc
    ```

    ### Format output (--format) {#format}

    #### JSON output

    ```console
    $ docker buildx history ls --format json
    [
      {
        "ID": "qu2gsuo8ejqrwdfii23xkkckt",
        "Name": ".dev/2850",
        "Status": "Completed",
        "CreatedAt": "2025-04-15T12:33:00Z",
        "Duration": "1.4s"
      },
      {
        "ID": "qsiifiuf1ad9pa9qvppc0z1l3",
        "Name": ".dev/2850",
        "Status": "Completed",
        "CreatedAt": "2025-04-15T12:29:00Z",
        "Duration": "1.3s"
      }
    ]
    ```

    #### Go template output

    ```console
    $ docker buildx history ls --format '{{.Name}} - {{.Duration}}'
    .dev/2850 - 1.4s
    .dev/2850 - 1.3s
    .dev/3120 - 2.1s
    ```
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false

