本文整理匯總了Java中com.spotify.docker.client.DockerClient.removeImage方法的典型用法代碼示例。如果您正苦於以下問題:Java DockerClient.removeImage方法的具體用法?Java DockerClient.removeImage怎麽用?Java DockerClient.removeImage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.spotify.docker.client.DockerClient
的用法示例。
在下文中一共展示了DockerClient.removeImage方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: validate
import com.spotify.docker.client.DockerClient; //導入方法依賴的package包/類
@Override
public void validate(String tag) throws Exception {
DockerClient client = DefaultDockerClient.fromEnv().authConfig(creds.toAuthConfig()).build();
client.removeImage(tag);
//Pull the image from the registry
client.pull(tag);
}
示例2: removeImage
import com.spotify.docker.client.DockerClient; //導入方法依賴的package包/類
private void removeImage(DockerClient dockerClient, String imageName) throws DockerException, InterruptedException {
try {
dockerClient.removeImage(imageName);
} catch (ImageNotFoundException e) {
// remove if it exists, if it's not this is OK
}
assertFalse(imageAvaliable(dockerClient, imageName));
}
示例3: cleanup
import com.spotify.docker.client.DockerClient; //導入方法依賴的package包/類
public void cleanup() throws Exception {
DockerClient client = getDockerClient();
// Remove image to free the used space
logger.info("Deleting image from local Storage");
client.removeImage(getTag());
}