Expand description
Docker operations module
This module provides Docker container management functionality including:
- Docker client wrapper with connection handling
- Docker-specific error types
- Embedded Dockerfile for building the opencode image
- Progress reporting for build and pull operations
- Image build and pull operations
- Volume management for persistent storage
- Container lifecycle (create, start, stop, remove)
Re-exports§
pub use progress::ProgressReporter;pub use image::build_image;pub use image::image_exists;pub use image::pull_image;pub use volume::MOUNT_CONFIG;pub use volume::MOUNT_PROJECTS;pub use volume::MOUNT_SESSION;pub use volume::VOLUME_CONFIG;pub use volume::VOLUME_NAMES;pub use volume::VOLUME_PROJECTS;pub use volume::VOLUME_SESSION;pub use volume::ensure_volumes_exist;pub use volume::remove_all_volumes;pub use volume::remove_volume;pub use volume::volume_exists;pub use container::CONTAINER_NAME;pub use container::OPENCODE_WEB_PORT;pub use container::container_exists;pub use container::container_is_running;pub use container::container_state;pub use container::create_container;pub use container::remove_container;pub use container::start_container;pub use container::stop_container;
Modules§
- container
- Docker container lifecycle management
- image
- Docker image build and pull operations
- progress
- Progress reporting utilities for Docker operations
- volume
- Docker volume management
Structs§
- Docker
Client - Docker client wrapper with connection handling
Enums§
- Docker
Error - Errors that can occur during Docker operations
Constants§
- DOCKERFILE
- The Dockerfile for building the opencode-cloud container image
- IMAGE_
NAME_ DOCKERHUB - Docker image name for Docker Hub (fallback registry)
- IMAGE_
NAME_ GHCR - Docker image name for GitHub Container Registry (primary registry)
- IMAGE_
TAG_ DEFAULT - Default image tag
Functions§
- setup_
and_ start - Full setup: ensure volumes exist, create container if needed, start it
- stop_
service - Stop and optionally remove the opencode container