##// END OF EJS Templates
Implemented RunContainer, ExecContainer, StopContainer, RmContainer, ComposeExec tasks
Implemented RunContainer, ExecContainer, StopContainer, RmContainer, ComposeExec tasks

File last commit:

r14:ab28d6aa054e v1.2.1 default
r19:5e6d0e24a5d2 v1.3.0 default
Show More
bundle.md
57 lines | 1.4 KiB | text/x-minidsrc | MarkdownLexer
cin
More documentation, TagImage task supports multiple tags, set COMPOSE_PROJECT_NAME to project.group by default
r14 # Creating bundle from images
## NAME
Save set of images to the single archive.
## SYNOPSIS
```gradle
plugins {
// task types and base extension
id "org.implab.gradle-container-base"
}
container {
cliCmd = "podman"
}
// create configuration
configurations {
bundleImages {
canBeResolved = true
canBeConsumed = false
}
}
// add dependencies to the project
dependencies {
bundleImages project(":images:foo"), project(":images:bar")
}
// create task to export bundle
task bundle(type: SaveImage) {
// add image refs from artifacts
imageRefs configurations.bundleImages
// add image name
exportImages.add "nginx:latest"
}
```
## DESCRIPTION
To create an archive with images the task of type `SaveImage` can be used. This
task has the following properties:
| Property | Description |
|-|-|
| `archiveFileName` | The file name of the bundle archive, defaults to `{archiveBaseName}-{archiveVersion}-{archiveClassifier}.{archiveExtension}`.|
| `archiveBaseName` | The base name of the archive, defaults to `{project.group}-{project.name}`. |
| `archiveVersion` | The archive version, defaults to `{project.version}`. |
| `exportImages` | A set of image names to include in the bundle. |
| Method | Description |
|-|-|
| `imageRefs(FileCollection)` | Adds a set of files with image refs to add to the bundle. |
| `imageRef(File)` | Adds an image name from the file with image reference. |