pub async fn create_user(
client: &DockerClient,
container: &str,
username: &str,
) -> Result<(), DockerError>Expand description
Create a new user in the container
Creates a user with a home directory and /bin/bash shell. Returns an error if the user already exists.
§Arguments
client- Docker clientcontainer- Container name or IDusername- Username to create
§Example
ⓘ
create_user(&client, "opencode-cloud", "admin").await?;