Service Organization
Services are located insrc/lib/services/ and organized into modules:
containerization/- Container, image, network, and system operationssqlite/- Database operationsfs-events/- File system event watcherstray/- System tray menu management
Container Services
Container Management
Location:src/lib/services/containerization/containers.ts
getAllContainers
Retrieve all containers (running and stopped).startContainer
Start a stopped container.Container ID or name
stopContainer
Stop a running container.Container ID or name
removeContainer
Delete a container.Container ID or name to remove
inspectContainer
Get detailed container information.Container ID or name
JSON object containing detailed container configuration and state
getContainerLogs
Retrieve container logs.Container ID or name
Image Services
Location:src/lib/services/containerization/images.ts
getAllImages
List all container images.JSON array of image objects with tags, IDs, and sizes
pullImage
Pull an image from a registry.Array of image details (e.g.,
['nginx:latest'] or ['--platform', 'linux/amd64', 'nginx'])createPullImageCommand
Create a pull command without executing it (useful for custom execution).Array of image details and options
Tauri Command object that can be executed or streamed
removeImage
Remove a single image.Image name, ID, or digest
removeMultipleImages
Remove multiple images in a single operation.Array of image references to remove
inspectImage
Get detailed image information.Image name, ID, or digest
JSON object with image layers, configuration, and metadata
importImageFromTar
Import an image from a tar archive.Absolute path to the tar file
exportImageToTar
Export an image to a tar archive.Image to export
Destination path for the tar file
Optional flags (e.g.,
['--arch', 'aarch64'])System Services
Location:src/lib/services/containerization/system/service.ts
startContainerization
Start the container service.stopContainerization
Stop the container service.containerizationStatus
Check if the container service is running.Service status information
Setup Services
Location:src/lib/services/containerization/setup.ts
hasContainerCli
Check if the container CLI is available.true if the container command is available, false otherwisecreateSymlink
Create symlinks for container binaries with elevated privileges.- Container binaries →
/usr/local/bin/container - Container API server →
/usr/local/bin/container-api - Libexec directory →
/usr/local/libexec
DNS Services
Location:src/lib/services/containerization/dns.ts
createDns
Create a DNS entry for container networking.Domain name to create (e.g., “example.local”)
getAllDnsConfig
List all DNS configurations.Space-separated list of DNS entries
Registry Services
Location:src/lib/services/containerization/registry/auth.ts
registryLogin
Authenticate with a container registry.registryLogout
Log out from a container registry.Database Services
Location:src/lib/services/sqlite/registry.ts
addRegistry
Add a container registry to the database.Utility Functions
Location:src/lib/services/containerization/utils.ts
createContainerCommand
Create a container CLI command.Command arguments
Tauri shell Command instance
validateCommandOutput
Validate and normalize command output.Raw output from Tauri shell command