Docker
The Docker library will build docker images and push them into a docker repository.
Steps Contributed
Step | Description |
---|---|
|
builds a container image, tagging it with the Git SHA, and pushes the image to the defined registry |
|
inspects the source code repository based upon the configured |
|
logs in to the configured container registry |
|
retags the container images determined by |
Example Configuration Snippet
libraries{
docker {
build_strategy = "dockerfile"
registry = "docker-registry.default.svc:5000"
cred = "openshift-docker-registry"
repo_path_prefix = "proj-images"
remove_local_image = true
}
}
Configurations
Field | Description | Default Value | Required |
---|---|---|---|
build_strategy |
Sets how the library will build the container image(s); Must be dockerfile, docker-compose, or modules |
dockerfile |
false |
registry |
Where the container images produced during the pipeline builds are going to be pushed to |
true |
|
cred |
Credentials used for the repository where different docker pipeline tools are stored. |
true |
|
repo_path_prefix |
The part of the repository name between the registry name and the last forward-slash |
"" |
false |
remove_local_image |
Determines if the pipeline should remove the local image after building or retagging |
false |
false |