Documentation ¶
Index ¶
- Variables
- func CreateDockerTarContext(ctx context.Context, w io.Writer, workspace string, a *latest.DockerArtifact, ...) error
- func GetBuildArgs(a *latest.DockerArtifact) ([]string, error)
- func GetDependencies(ctx context.Context, workspace string, dockerfilePath string, ...) ([]string, error)
- func NormalizeDockerfilePath(context, dockerfile string) (string, error)
- func Prune(ctx context.Context, out io.Writer, images []string, client LocalDaemon) error
- func RemoteDigest(identifier string, insecureRegistries map[string]bool) (string, error)
- func RetrieveRemoteConfig(identifier string, insecureRegistries map[string]bool) (*v1.ConfigFile, error)
- func ValidateDockerfile(path string) bool
- func WalkWorkspace(workspace string, excludes, deps []string) (map[string]bool, error)
- type AuthConfigHelper
- type BuildResult
- type ImageReference
- type LocalDaemon
- type PushResult
Constants ¶
This section is empty.
Variables ¶
var RetrieveImage = retrieveImage
RetrieveImage is overridden for unit testing
Functions ¶
func CreateDockerTarContext ¶
func GetBuildArgs ¶ added in v0.11.0
func GetBuildArgs(a *latest.DockerArtifact) ([]string, error)
GetBuildArgs gives the build args flags for docker build.
func GetDependencies ¶ added in v0.7.0
func GetDependencies(ctx context.Context, workspace string, dockerfilePath string, buildArgs map[string]*string, insecureRegistries map[string]bool) ([]string, error)
GetDependencies finds the sources dependencies for the given docker artifact. All paths are relative to the workspace.
func NormalizeDockerfilePath ¶ added in v0.11.0
NormalizeDockerfilePath returns the absolute path to the dockerfile.
func RemoteDigest ¶ added in v0.5.0
func RetrieveRemoteConfig ¶ added in v0.24.0
func RetrieveRemoteConfig(identifier string, insecureRegistries map[string]bool) (*v1.ConfigFile, error)
RetrieveRemoteConfig retrieves the remote config file for an image
func ValidateDockerfile ¶ added in v0.14.0
ValidateDockerfile makes sure the given Dockerfile is existing and valid.
Types ¶
type AuthConfigHelper ¶
type AuthConfigHelper interface { GetAuthConfig(registry string) (types.AuthConfig, error) GetAllAuthConfigs() (map[string]types.AuthConfig, error) }
AuthConfigHelper exists for testing purposes since GetAuthConfig shells out to native store helpers. Ideally this shouldn't be public, but the LocalBuilder needs to use it.
var ( // DefaultAuthHelper is exposed so that other packages can override it for testing DefaultAuthHelper AuthConfigHelper )
type BuildResult ¶ added in v0.21.0
type BuildResult struct {
ID string
}
BuildResult gives the information on an image that has been built.
type ImageReference ¶ added in v0.7.0
ImageReference is a parsed image name.
func ParseReference ¶ added in v0.7.0
func ParseReference(image string) (*ImageReference, error)
ParseReference parses an image name to a reference.
type LocalDaemon ¶ added in v0.21.0
type LocalDaemon interface { Close() error ExtraEnv() []string ServerVersion(ctx context.Context) (types.Version, error) ConfigFile(ctx context.Context, image string) (*v1.ConfigFile, error) Build(ctx context.Context, out io.Writer, workspace string, a *latest.DockerArtifact, ref string) (string, error) Push(ctx context.Context, out io.Writer, ref string) (string, error) Pull(ctx context.Context, out io.Writer, ref string) error Load(ctx context.Context, out io.Writer, input io.Reader, ref string) (string, error) Tag(ctx context.Context, image, ref string) error ImageID(ctx context.Context, ref string) (string, error) ImageInspectWithRaw(ctx context.Context, image string) (types.ImageInspect, []byte, error) ImageRemove(ctx context.Context, image string, opts types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error) RepoDigest(ctx context.Context, ref string) (string, error) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error) ImageExists(ctx context.Context, ref string) bool }
LocalDaemon talks to a local Docker API.
func NewAPIClient ¶ added in v0.8.0
func NewAPIClient(forceRemove bool, insecureRegistries map[string]bool) (LocalDaemon, error)
NewAPIClient guesses the docker client to use based on current kubernetes context.
func NewLocalDaemon ¶ added in v0.21.0
func NewLocalDaemon(apiClient client.CommonAPIClient, extraEnv []string, forceRemove bool, insecureRegistries map[string]bool) LocalDaemon
NewLocalDaemon creates a new LocalDaemon.
type PushResult ¶ added in v0.21.0
type PushResult struct {
Digest string
}
PushResult gives the information on an image that has been pushed.