# with_port

Add a port mapping to the container.

```rhai
container.with_port(port) -> Container
```

## Parameters

- `port` (string): Port mapping in format "host:container" or just "port"

## Returns

Returns the `Container` builder for method chaining.

## Examples

```rhai
// Map host port 8080 to container port 80
let container = nerdctl_container_from_image("web", "nginx:latest")
    .with_port("8080:80")
    .with_port("443:443")
    .build();

// Map same port on host and container
let container2 = nerdctl_container_from_image("app", "myapp:latest")
    .with_port("3000")
    .build();
```

## Notes

- This is a chainable method
- Can be called multiple times to expose multiple ports
- Use `with_ports()` to add multiple ports from an array
- Format: "host_port:container_port" or just "port"
