# build

Build an image from a Dockerfile (static function).

```rhai
builder.build(tag, context_dir, file, isolation) -> CommandResult
```

## Parameters

- `tag` (string): Tag for the resulting image
- `context_dir` (string): Build context directory
- `file` (string): Path to Dockerfile
- `isolation` (string): Isolation mode (e.g., "chroot", "rootless")

## Returns

Returns a `CommandResult` with the build operation output.

## Examples

```rhai
let builder = bah_new("temp", "ubuntu:22.04");

// Build from Dockerfile
let result = builder.build(
    "myapp:latest",
    "./app",
    "./app/Dockerfile",
    "chroot"
);

if result.success {
    print("Build successful!");
    print(result.stdout);
}
```

## Notes

- This is a static method
- Similar to `docker build` command
- Context directory is the root for COPY/ADD commands in Dockerfile
- Isolation modes: "chroot", "rootless", "oci"
