# with_env

Add an environment variable to the container.

```rhai
container.with_env(key, value) -> Container
```

## Parameters

- `key` (string): Environment variable name
- `value` (string): Environment variable value

## Returns

Returns the `Container` builder for method chaining.

## Examples

```rhai
let container = nerdctl_container_from_image("app", "myapp:latest")
    .with_env("DEBUG", "true")
    .with_env("DATABASE_URL", "postgres://localhost/mydb")
    .with_env("PORT", "3000")
    .build();
```

## Notes

- This is a chainable method
- Can be called multiple times to set multiple variables
- Use `with_envs()` to add multiple variables from a map
