Documentation
¶
Overview ¶
Package container for dealing with containers via dagger
Index ¶
- Constants
- func CheckIfDiscontinued(containerURL string) error
- func CleanupAfterContainer(ctx context.Context) error
- func GetArtifacts(ctx context.Context, container *dagger.Container, artifacts *[]Artifacts) error
- func Setup(ctx context.Context, client *dagger.Client, opts *SetupOpts) (*dagger.Container, error)
- type Artifacts
- type SetupOpts
Constants ¶
View Source
const ( // ModeURL means that opts.ContainerURL is actual URL ModeURL containerURLtype = iota // ModeDockerfile means that opts.ContainerURL is filepath to Dockerfile ModeDockerfile // ModeTarfile means that opts.ContainerURL is filepath to TAR file ModeTarfile )
Variables ¶
This section is empty.
Functions ¶
func CheckIfDiscontinued ¶
CheckIfDiscontinued prints a warning if the used container is discontinued
func CleanupAfterContainer ¶
CleanupAfterContainer performs cleanup operations after container use
func GetArtifacts ¶
GetArtifacts extracts files from container to host Either both ContainerDir and HostDir must be directories, or both must be files
Types ¶
type Artifacts ¶
type Artifacts struct {
ContainerPath string // Path inside container
ContainerDir bool // Is ^^^ path directory?
HostPath string // Path inside host
HostDir bool // Is ^^^ path directory?
}
Artifacts is passes to GetArtifacts as argument, and specifies extraction of files form container at containerDir to host at hostDir
type SetupOpts ¶
type SetupOpts struct {
ContainerURL string // URL or name of docker container
MountHostDir string // Directory from host to mount into container
MountContainerDir string // Where to mount ^^^ host directory inside container
WorkdirContainer string // Workdir of the container
ContainerInputDir string // Directory for input files
InputDirs []string // List of directories to copy into container
InputFiles []string // List of files to copy into container
}
SetupOpts congregates options for Setup function None of the values can be empty string, and mountContainerDir cannot be '.' or '/'
Click to show internal directories.
Click to hide internal directories.