docker

package
v0.0.0-...-768ca8c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles Docker operations

func NewManager

func NewManager() (*Manager, error)

NewManager creates a new Docker manager

func (*Manager) Clean

func (m *Manager) Clean() error

func (*Manager) EnableService

func (m *Manager) EnableService(service Service)

EnableService adds a service to be started

func (*Manager) EnsureImage

func (m *Manager) EnsureImage(image string) error

EnsureImage ensures a Docker image is available locally, pulling it if needed

func (*Manager) EnsurePlaywrightImage

func (m *Manager) EnsurePlaywrightImage() error

Clean removes all Docker containers and volumes EnsurePlaywrightImage ensures the Playwright Docker image is available

func (*Manager) SetupDefaultServices

func (m *Manager) SetupDefaultServices()

SetupDefaultServices configures the manager with the default set of services

func (*Manager) Start

func (m *Manager) Start() error

Start starts the Docker services

func (*Manager) Stop

func (m *Manager) Stop() error

Stop stops all Docker services without removing containers

type Service

type Service string

Service represents a Docker service that can be enabled

const (
	Minio         Service = "minio"
	OpenLDAP      Service = "openldap"
	Elasticsearch Service = "elasticsearch"
	MySQLReplica  Service = "mysql-read-replica"
	Postgres      Service = "postgres"
	Inbucket      Service = "inbucket"
	Redis         Service = "redis"
	Playwright    Service = "playwright"
)

type ServiceConfig

type ServiceConfig struct {
	Image        string
	ExposedPorts map[string]string // host:container
	Env          []string
	Volumes      map[string]string // host:container
	Command      []string
}

ServiceConfig holds configuration for a Docker service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL