envs

package
v0.6.9 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPkgEnv

func NewPkgEnv() (c *dagger.Container)

Types

type Runtime

type Runtime struct {
	Ctx    context.Context
	Client *dagger.Client

	HofVer string
	CueVer string
	GoVer  string

	ContainerRuntime string
	ContainerVersion string

	RunGroup string
	RunCase  string

	Verbose bool
}

so we don't have to pass these around everywhere

func NewRuntime

func NewRuntime() (*Runtime, error)

func (*Runtime) AddDockerCLI

func (R *Runtime) AddDockerCLI(c *dagger.Container) *dagger.Container

func (*Runtime) AddNerdctl

func (R *Runtime) AddNerdctl(c *dagger.Container) *dagger.Container

func (*Runtime) AttachDaemonAsService

func (R *Runtime) AttachDaemonAsService(c, daemon *dagger.Container) (*dagger.Container, error)

Attaches the daemon as a dagger service to the container with the right settings. A single daemon can be shared among many containers this way, running separately from each of them.

func (*Runtime) BaseImage

func (R *Runtime) BaseImage() *dagger.Container

func (*Runtime) BuildHof

func (R *Runtime) BuildHof(c *dagger.Container, source *dagger.Directory) *dagger.Container

func (*Runtime) DockerClientContainer

func (R *Runtime) DockerClientContainer() (*dagger.Container, error)

func (*Runtime) DockerDaemonContainer

func (R *Runtime) DockerDaemonContainer() (*dagger.Container, error)

Defines an image or container that runs the dockerd daemon inside a container. We attach this to another container as a service, so that things running there can interact with the docker client, pull images, or run containers. We need this because hof will exec out to docker cli and then http request at the containers. When just mounting the docker socket, these containers were unreachable.

func (*Runtime) FetchGoDeps

func (R *Runtime) FetchGoDeps(c *dagger.Container, source *dagger.Directory) *dagger.Container

func (*Runtime) GitSource

func (R *Runtime) GitSource(url, ref string) *dagger.Directory

func (*Runtime) HarmonizeCue

func (R *Runtime) HarmonizeCue(c *dagger.Container, source *dagger.Directory) *dagger.Directory

func (*Runtime) HarmonizeHof

func (R *Runtime) HarmonizeHof(c *dagger.Container, source *dagger.Directory) *dagger.Directory

func (*Runtime) HofImage

func (R *Runtime) HofImage(builder *dagger.Container) *dagger.Container

func (*Runtime) HofSource

func (R *Runtime) HofSource() *dagger.Directory

func (*Runtime) NewCliEnv

func (R *Runtime) NewCliEnv() (c *dagger.Container)

Jump to

Keyboard shortcuts

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