# with_volume

Add a volume mount to the container.

```rhai
container.with_volume(volume) -> Container
```

## Parameters

- `volume` (string): Volume mount in format "host_path:container_path" or named volume

## Returns

Returns the `Container` builder for method chaining.

## Examples

```rhai
// Bind mount host directory
let container = nerdctl_container_from_image("db", "postgres:latest")
    .with_volume("/data/postgres:/var/lib/postgresql/data")
    .with_env("POSTGRES_PASSWORD", "secret")
    .build();

// Named volume
let container2 = nerdctl_container_from_image("app", "myapp:latest")
    .with_volume("appdata:/app/data")
    .build();
```

## Notes

- This is a chainable method
- Can be called multiple times to mount multiple volumes
- Use `with_volumes()` to add multiple volumes from an array
- Format: "host_path:container_path[:options]"
