Package io.fabric8.maven.docker.service
Class RegistryService
- java.lang.Object
-
- io.fabric8.maven.docker.service.RegistryService
-
public class RegistryService extends Object
Allows to interact with registries, eg. to push/pull images.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRegistryService.RegistryConfig
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpullImageWithPolicy(String image, ImagePullManager pullManager, RegistryService.RegistryConfig registryConfig, BuildImageConfiguration buildImageConfiguration)Check an image, and, ifautoPullis set to true, fetch it.voidpushImages(Collection<ImageConfiguration> imageConfigs, int retries, RegistryService.RegistryConfig registryConfig, boolean skipTag)Push a set of images to a registry
-
-
-
Method Detail
-
pushImages
public void pushImages(Collection<ImageConfiguration> imageConfigs, int retries, RegistryService.RegistryConfig registryConfig, boolean skipTag) throws DockerAccessException, org.apache.maven.plugin.MojoExecutionException
Push a set of images to a registry- Parameters:
imageConfigs- images to push (but only if they have a build configuration)retries- how often to retryregistryConfig- a global registry configurationskipTag- flag to skip pushing tagged images- Throws:
DockerAccessExceptionorg.apache.maven.plugin.MojoExecutionException
-
pullImageWithPolicy
public void pullImageWithPolicy(String image, ImagePullManager pullManager, RegistryService.RegistryConfig registryConfig, BuildImageConfiguration buildImageConfiguration) throws DockerAccessException, org.apache.maven.plugin.MojoExecutionException
Check an image, and, ifautoPullis set to true, fetch it. Otherwise if the image is not existent, throw an error- Parameters:
image- image which is required to be pulledpullManager- image pull managerregistryConfig- registry configurationbuildImageConfiguration- image build configuration- Throws:
DockerAccessException- in case of error in contacting docker daemonorg.apache.maven.plugin.MojoExecutionException- in case of any other misc failure
-
-