> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# devarsh/docker-buildx-orb

Orb for installing and using Docker Buildx for multi-architecture builds.


## Commands

### install

Install Docker Buildx for multi-architecture builds

| Parameter | Type | Default | Description |
|---|---|---|---|
| `buildx-version` | string | v0.5.1 | Version of Docker Buildx to install |

### build-and-push

Build and push multi-architecture Docker image using Buildx

| Parameter | Type | Default | Description |
|---|---|---|---|
| `image-name` | string | CIRCLE_PROJECT_NAME | Name of the Docker image to build |
| `tag` | string | CIRCLE_TAG | Tag for the Docker image |
| `dockerfile` | string | Dockerfile | Path to the Dockerfile |
| `platforms` | string | linux/amd64,linux/arm64 | Platforms to build for (comma-separated) |
| `context` | string | . | Build context |
| `push` | boolean | true | Whether to push the image |
| `docker-username` | env_var_name | DOCKERHUB_USERNAME | Environment variable storing Docker Hub username |
| `docker-password` | env_var_name | DOCKERHUB_PASSWORD | Environment variable storing Docker Hub password |

## Jobs

### build-and-push-image

Build and push a multi-architecture Docker image

| Parameter | Type | Default | Description |
|---|---|---|---|
| `image-name` | string | CIRCLE_PROJECT_NAME | Name of the Docker image to build |
| `tag` | string | CIRCLE_TAG | Tag for the Docker image |
| `checkout` | boolean | true | Whether to checkout the repository |
| `setup-remote-docker` | boolean | true | Whether to setup remote Docker |
| `docker-version` | string | 20.10 | Docker version to use |
| `executor` | executor | default-executor | Executor to use for this job |
| `platforms` | string | linux/amd64,linux/arm64 | Platforms to build for (comma-separated) |
| `build-steps` | steps |  | Additional steps to run before building the image |

## Executors

### default-executor