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

# hexr push

> Build a multi-platform container image, run vulnerability scanning, and push to your container registry.

## Usage

```bash theme={null}
hexr push [options]
```

Runs from a directory containing `.hexr/` (generated by `hexr build`).

***

## Interactive Flow

`hexr push` detects available build strategies and prompts you to choose:

```bash theme={null}
$ hexr push

Detected build strategies:
  1. Docker Build Cloud (cloud-sugiv-hexr) [RECOMMENDED]
  2. Local buildx (linux/amd64, linux/arm64)
  3. Basic Docker (linux/arm64 only)
  4. CI/CD (GitHub Actions / GitLab CI)

Select strategy [1]: 1

Building for: linux/amd64, linux/arm64
Image: us-central1-docker.pkg.dev/hexr-cloud-prod/hexr-images/acme-research-analyst:v1.0.0

Step 1/6: Building container...
Step 2/6: Multi-platform manifest...
Step 3/6: Vulnerability scan...

┌─────────────────────────────────────┐
│ Vulnerability Scan Results          │
├──────────┬──────────────────────────┤
│ Critical │ 0                        │
│ High     │ 0                        │
│ Medium   │ 2 (known, no fix yet)    │
│ Low      │ 5                        │
└──────────┴──────────────────────────┘

Step 4/6: Pushing to registry...
Step 5/6: Verifying digest...
Step 6/6: Updating manifest...

✓ Image pushed successfully
  Digest: sha256:abc123...
  Platforms: linux/amd64, linux/arm64
```

***

## Build Strategies

| Strategy               | Description                                 | Platforms       |
| ---------------------- | ------------------------------------------- | --------------- |
| **Docker Build Cloud** | Remote build in Docker's cloud              | amd64 + arm64   |
| **Local buildx**       | Multi-platform build on your machine        | amd64 + arm64   |
| **Basic Docker**       | Standard `docker build`                     | Local arch only |
| **CI/CD**              | Generates GitHub Actions / GitLab CI config | amd64 + arm64   |

<Info>
  For Hexr Cloud users, `hexr push --cloud` uses **Google Cloud Build** instead —
  no local Docker required.
</Info>

***

## Vulnerability Scanning

Four scan levels:

| Level      | Behavior                                   |
| ---------- | ------------------------------------------ |
| `none`     | Skip scanning                              |
| `basic`    | Scan for critical and high vulnerabilities |
| `standard` | Scan all severities, fail on critical      |
| `strict`   | Scan all severities, fail on high or above |

***

## Cloud Build (hexr push --cloud)

For Hexr Cloud, push uses Google Cloud Build:

```bash theme={null}
$ hexr push --cloud

Submitting to Google Cloud Build...
  Project: hexr-cloud-prod
  Registry: us-central1-docker.pkg.dev/hexr-cloud-prod/hexr-images
  
Building... (this takes 1-2 minutes)
  ✓ Build completed
  ✓ Image: acme-research-analyst:v1.0.0
```
