# with_network

Set the network for the container.

```rhai
container.with_network(network) -> Container
```

## Parameters

- `network` (string): Network name to connect to

## Returns

Returns the `Container` builder for method chaining.

## Examples

```rhai
let container = nerdctl_container_from_image("app", "myapp:latest")
    .with_network("mynetwork")
    .with_network_alias("app.local")
    .build();
```

## Notes

- This is a chainable method
- Use with `with_network_alias()` to set DNS names
- Default network is "bridge"
