create_container

Function create_container 

Source
pub async fn create_container(
    client: &DockerClient,
    name: Option<&str>,
    image: Option<&str>,
    opencode_web_port: Option<u16>,
    env_vars: Option<Vec<String>>,
) -> Result<String, DockerError>
Expand description

Create the opencode container with volume mounts

Does not start the container - use start_container after creation. Returns the container ID on success.

ยงArguments

  • client - Docker client
  • name - Container name (defaults to CONTAINER_NAME)
  • image - Image to use (defaults to IMAGE_NAME_GHCR:IMAGE_TAG_DEFAULT)
  • opencode_web_port - Port to bind on host for opencode web UI (defaults to OPENCODE_WEB_PORT)
  • env_vars - Additional environment variables (optional)