Documentation
¶
Index ¶
- Constants
- type DockerBuildCmd
- func (b *DockerBuildCmd) AddAuth(username, password, registry string) error
- func (b *DockerBuildCmd) AddBuildArgs(arg string, value string) error
- func (b *DockerBuildCmd) AddBuildContext(dockercontexts ...buildcontext.DockerBuildContexter) error
- func (b *DockerBuildCmd) AddPushAuth(username, password string) error
- func (b *DockerBuildCmd) AddTags(tag string) error
- func (b *DockerBuildCmd) Run(ctx context.Context) error
Constants ¶
View Source
const ( // DefaultDockerfile is the default filename for Dockerfile DefaultDockerfile string = "Dockerfile" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerBuildCmd ¶
type DockerBuildCmd struct { // Cli is the docker api client Cli types.DockerClienter // ImageName is the name of the image ImageName string // ImageBuildOptions from docker sdk ImageBuildOptions *dockertypes.ImageBuildOptions // ImagePushOptions from docker sdk ImagePushOptions *dockertypes.ImagePushOptions // PushAfterBuild when is true images are automatically pushed to registry after build PushAfterBuild bool // Response manages responses from docker client Response types.Responser // UseNormalizedNamed when is true tags are transformed to a fully qualified reference UseNormalizedNamed bool // RemoveAfterPush when is true images are removed from local after push RemoveAfterPush bool }
DockerBuilderCmd
func (*DockerBuildCmd) AddAuth ¶ added in v0.4.0
func (b *DockerBuildCmd) AddAuth(username, password, registry string) error
AddAuth append new tags to DockerBuilder
func (*DockerBuildCmd) AddBuildArgs ¶ added in v0.4.0
func (b *DockerBuildCmd) AddBuildArgs(arg string, value string) error
AddBuildArgs append new tags to DockerBuilder
func (*DockerBuildCmd) AddBuildContext ¶ added in v0.4.0
func (b *DockerBuildCmd) AddBuildContext(dockercontexts ...buildcontext.DockerBuildContexter) error
AddBuildContext include the docker build context. It supports to use several context which are merged before to start the image build
func (*DockerBuildCmd) AddPushAuth ¶ added in v0.4.0
func (b *DockerBuildCmd) AddPushAuth(username, password string) error
AddPushAuth append new tags to DockerBuilder
func (*DockerBuildCmd) AddTags ¶ added in v0.4.0
func (b *DockerBuildCmd) AddTags(tag string) error
AddTags append new tags to DockerBuilder
func (*DockerBuildCmd) Run ¶
func (b *DockerBuildCmd) Run(ctx context.Context) error
Run execute the docker build https://docs.docker.com/engine/api/v1.39/#operation/ImageBuild
Click to show internal directories.
Click to hide internal directories.