docker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildConfig

type BuildConfig struct {
	Context    string
	Dockerfile string
	ImageName  string
	ImageTag   string
	BuildArgs  map[string]string
	Labels     map[string]string
	NoCache    bool
	Target     string
}

BuildConfig holds Docker build configuration.

func (*BuildConfig) GetBuildArgs

func (c *BuildConfig) GetBuildArgs() []string

GetBuildArgs converts build args to CLI args.

type DockerComposeConfig

type DockerComposeConfig struct {
	Version  string
	Services map[string]ServiceConfig
}

DockerComposeConfig represents docker-compose configuration.

func NewCompose

func NewCompose(version string) *DockerComposeConfig

NewCompose creates a new docker-compose config.

func (*DockerComposeConfig) AddService

func (c *DockerComposeConfig) AddService(name string, config ServiceConfig)

AddService adds a service.

func (*DockerComposeConfig) Generate

func (c *DockerComposeConfig) Generate() string

Generate generates docker-compose.yml content.

type Image

type Image struct {
	Registry string
	Name     string
	Tag      string
}

Image represents a Docker image.

func ParseImage

func ParseImage(s string) (*Image, error)

ParseImage parses an image string.

func (*Image) String

func (i *Image) String() string

String returns the full image string.

type ServiceConfig

type ServiceConfig struct {
	Image       string
	Build       string
	Ports       []string
	Environment map[string]string
	Volumes     []string
	DependsOn   []string
	Command     string
}

ServiceConfig holds service configuration.

Jump to

Keyboard shortcuts

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