Documentation
¶
Index ¶
- func AddFileToTar(tw *tar.Writer, name string, fileContent []byte) error
- func BuildDockerImage(ctx context.Context, dockerfileName, tag string, dockerfileContent []byte) error
- func GetCurrentUG() string
- func GetEnvVars(vars []string) map[string]string
- func ParseEnvFile(envData string) map[string]string
- func RemoveContainer(ctx context.Context, containerName string) error
- func RunContainer(ctx context.Context, containerName string, config *container.Config, ...) (*container.CreateResponse, error)
- type ContainerConfig
- type ContainerHostConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFileToTar ¶
AddFileToTar add a file to the tarball
func BuildDockerImage ¶
func BuildDockerImage(ctx context.Context, dockerfileName, tag string, dockerfileContent []byte) error
BuildDockerImage constructs and builds a Docker image using provided contents and parameters.
func GetCurrentUG ¶
func GetCurrentUG() string
GetCurrentUG returns the current user's uid:gid. It uses command execution as a fallback if the Go user package fails.
func GetEnvVars ¶
func ParseEnvFile ¶
func RunContainer ¶
func RunContainer(ctx context.Context, containerName string, config *container.Config, hostConfig *container.HostConfig) (*container.CreateResponse, error)
Types ¶
type ContainerConfig ¶
type ContainerHostConfig ¶
type ContainerHostConfig = container.HostConfig
Click to show internal directories.
Click to hide internal directories.