docker

package
v0.0.0-...-020849e Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFileToTar

func AddFileToTar(tw *tar.Writer, name string, fileContent []byte) error

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 GetEnvVars(vars []string) map[string]string

func ParseEnvFile

func ParseEnvFile(envData string) map[string]string

func RemoveContainer

func RemoveContainer(ctx context.Context, containerName string) error

func RunContainer

func RunContainer(ctx context.Context, containerName string, config *container.Config, hostConfig *container.HostConfig) (*container.CreateResponse, error)

Types

type ContainerConfig

type ContainerConfig = container.Config

type ContainerHostConfig

type ContainerHostConfig = container.HostConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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