Documentation ¶
Index ¶
- Constants
- func ConvertRepositoryTagToTag(tag string) string
- func ConvertRepositoryTagsToTags(tags []string) []string
- func ConvertTagToRepositoryTag(tag string) string
- func CreateImageNameFromSpecAndTags(tags []string, outputRegistry string, outputRepository string) []string
- func CusterRegistryCredentials() func(string) (*RegistryCredentials, error)
- func GetDockerConfigPath() (string, error)
- func GetHTTPRequest(headers map[string]string, url string) ([]byte, error)
- func GetUtcTimestamp() string
- func JsonMapToString(jsonStr string, key string) (string, error)
- func LocalRegistryCredentials() func(string) (*RegistryCredentials, error)
- type Auths
- type Credentials
- type DockerBuildConfig
- type DockerClient
- func (d *DockerClient) BuildImage(ctx context.Context, buildFolder string) (string, error)
- func (d *DockerClient) PullImage(ctx context.Context, baseimage runtime.DockerImage) error
- func (d *DockerClient) PushImage(ctx context.Context, tag string, credentials *RegistryCredentials) error
- func (d *DockerClient) PushImages(ctx context.Context, tags []string, credentials *RegistryCredentials) error
- func (d *DockerClient) TagImage(ctx context.Context, imageId string, tag string) error
- type DockerClientAPI
- type DockerClientProxy
- func (proxy DockerClientProxy) ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)
- func (proxy DockerClientProxy) ImagePull(ctx context.Context, image string, options types.ImagePullOptions) (io.ReadCloser, error)
- func (proxy DockerClientProxy) ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error)
- func (proxy DockerClientProxy) ImageTag(ctx context.Context, image string, ref string) error
- type DockerConfig
- type ImageInfoProvider
- type Manifest
- type RegistryClient
- func (registry *RegistryClient) GetImageConfig(repository string, digest string) (map[string]interface{}, error)
- func (registry *RegistryClient) GetImageInfo(repository string, tag string) (*runtime.ImageInfo, error)
- func (registry *RegistryClient) GetTags(repository string) (*TagsAPIResponse, error)
- type RegistryCredentials
- type RegistryEntry
- type TagsAPIResponse
Constants ¶
View Source
const ( ENV_APP_VERSION = "APP_VERSION" ENV_AURORA_VERSION = "AURORA_VERSION" ENV_SNAPSHOT_TAG = "SNAPSHOT_TAG" ENV_PUSH_EXTRA_TAGS = "PUSH_EXTRA_TAGS" ENV_READINESS_CHECK_URL = "READINESS_CHECK_URL" ENV_READINESS_ON_MANAGEMENT_PORT = "READINESS_ON_MANAGEMENT_PORT" TZ = "TZ" IMAGE_BUILD_TIME = "IMAGE_BUILD_TIME" )
Variables ¶
This section is empty.
Functions ¶
func ConvertRepositoryTagToTag ¶ added in v1.18.0
func ConvertRepositoryTagsToTags ¶ added in v1.18.0
func ConvertTagToRepositoryTag ¶ added in v1.18.0
func CreateImageNameFromSpecAndTags ¶ added in v1.2.0
func CreateImageNameFromSpecAndTags(tags []string, outputRegistry string, outputRepository string) []string
CreateCompleteTagsFromSpecAndTags makes a target image to be used for push. The tag format in docker is somewhat confusing. For a description, see https://docs.docker.com/engine/reference/commandline/tag/ Given format a list of tags consisting of "a", "b" and "c", a registry host:5000 and repository "aurora/test", this function will return: host:5000/aurora/test:a host:5000/aurora/test:b host:5000/aurora/test:c
func CusterRegistryCredentials ¶ added in v1.2.0
func CusterRegistryCredentials() func(string) (*RegistryCredentials, error)
func GetDockerConfigPath ¶ added in v1.0.1
func GetHTTPRequest ¶ added in v1.6.0
func GetUtcTimestamp ¶ added in v1.3.0
func GetUtcTimestamp() string
func LocalRegistryCredentials ¶ added in v1.2.0
func LocalRegistryCredentials() func(string) (*RegistryCredentials, error)
Types ¶
type Auths ¶ added in v1.0.1
type Auths map[string]RegistryEntry
type Credentials ¶ added in v1.0.1
type DockerBuildConfig ¶
type DockerBuildConfig struct { AuroraVersion *runtime.AuroraVersion DockerRepository string ///TODO: Refactor? We need to have to different for nodejs BuildFolder string Baseimage runtime.DockerImage //We need to pull the newest image... }
type DockerClient ¶
type DockerClient struct {
Client DockerClientAPI
}
func NewDockerClient ¶
func NewDockerClient() (*DockerClient, error)
func (*DockerClient) BuildImage ¶
func (*DockerClient) PullImage ¶ added in v1.2.0
func (d *DockerClient) PullImage(ctx context.Context, baseimage runtime.DockerImage) error
THIS IS BUGGY!
func (*DockerClient) PushImage ¶
func (d *DockerClient) PushImage(ctx context.Context, tag string, credentials *RegistryCredentials) error
func (*DockerClient) PushImages ¶
func (d *DockerClient) PushImages(ctx context.Context, tags []string, credentials *RegistryCredentials) error
type DockerClientAPI ¶ added in v1.0.1
type DockerClientAPI interface { ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error) ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error) ImageTag(ctx context.Context, image string, ref string) error ImagePull(ctx context.Context, image string, options types.ImagePullOptions) (io.ReadCloser, error) }
type DockerClientProxy ¶ added in v1.0.1
type DockerClientProxy struct {
// contains filtered or unexported fields
}
func (DockerClientProxy) ImageBuild ¶ added in v1.0.1
func (proxy DockerClientProxy) ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)
func (DockerClientProxy) ImagePull ¶ added in v1.2.0
func (proxy DockerClientProxy) ImagePull(ctx context.Context, image string, options types.ImagePullOptions) (io.ReadCloser, error)
func (DockerClientProxy) ImagePush ¶ added in v1.0.1
func (proxy DockerClientProxy) ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error)
type DockerConfig ¶ added in v1.0.1
type DockerConfig struct { Auths Auths `json:"auths"` HttpHeaders map[string]string `json:"HttpHeaders,omitempty"` }
func ReadConfig ¶ added in v1.0.1
func ReadConfig(reader io.Reader) (*DockerConfig, error)
func (DockerConfig) GetCredentials ¶ added in v1.0.1
func (cfg DockerConfig) GetCredentials(address string) (*Credentials, error)
type ImageInfoProvider ¶ added in v1.0.0
type ImageInfoProvider interface { GetImageInfo(repository string, tag string) (*runtime.ImageInfo, error) GetTags(repository string) (*TagsAPIResponse, error) GetImageConfig(repository string, digest string) (map[string]interface{}, error) }
func NewRegistryClient ¶
func NewRegistryClient(address string) ImageInfoProvider
type RegistryClient ¶
type RegistryClient struct {
// contains filtered or unexported fields
}
func (*RegistryClient) GetImageConfig ¶ added in v1.27.0
func (registry *RegistryClient) GetImageConfig(repository string, digest string) (map[string]interface{}, error)
func (*RegistryClient) GetImageInfo ¶ added in v1.11.0
func (*RegistryClient) GetTags ¶
func (registry *RegistryClient) GetTags(repository string) (*TagsAPIResponse, error)
type RegistryCredentials ¶ added in v1.0.1
type RegistryCredentials struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Serveraddress string `json:"serveraddress,omitempty"` }
TODO: Fix context!!!
func (RegistryCredentials) Encode ¶ added in v1.0.1
func (rc RegistryCredentials) Encode() (string, error)
type RegistryEntry ¶ added in v1.0.1
type TagsAPIResponse ¶ added in v1.0.0
Click to show internal directories.
Click to hide internal directories.