本文整理汇总了Java中com.spotify.docker.client.messages.ImageInfo类的典型用法代码示例。如果您正苦于以下问题:Java ImageInfo类的具体用法?Java ImageInfo怎么用?Java ImageInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ImageInfo类属于com.spotify.docker.client.messages包,在下文中一共展示了ImageInfo类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createImage
import com.spotify.docker.client.messages.ImageInfo; //导入依赖的package包/类
private Image createImage(com.spotify.docker.client.messages.Image dockerImage, ImageInfo dockerImageInfo, Cloud cloud) {
Image image = new Image();
String imageId = idGenerator.getImageId(cloud, dockerImageInfo.id());
String projectId = idGenerator.getProjectId(cloud);
image.setId(imageId);
image.setRealId(dockerImageInfo.id());
image.setProjectIds(Collections.singletonList(projectId));
MetadataMap metadata = new MetadataMap();
metadata.put(MetadataKey.AUTHOR, dockerImageInfo.author());
metadata.put(MetadataKey.ARCHITECTURE, dockerImageInfo.architecture());
metadata.put(MetadataKey.OPERATING_SYSTEM, dockerImageInfo.os());
metadata.put(MetadataKey.PARENT, dockerImageInfo.parent());
metadata.put(MetadataKey.SIZE, dockerImage.virtualSize().toString());
image.setMetadata(metadata);
String imageName = dockerImage.repoTags().isEmpty() ?
String.format(
"docker-%s-%s-%s",
dockerImageInfo.os(),
dockerImageInfo.architecture(),
dockerImageInfo.id().substring(0, Math.min(dockerImageInfo.size().intValue(), 8))
) :
dockerImage.repoTags().get(0);
image.setName(imageName);
ZonedDateTime created = ZonedDateTime.ofInstant(
dockerImageInfo.created().toInstant(),
ZoneId.systemDefault()
);
image.setCreated(created);
image.setState(ImageState.SAVED);
image.setTimestamp(created);
return image;
}
示例2: inspectImage
import com.spotify.docker.client.messages.ImageInfo; //导入依赖的package包/类
@Override
public ImageInfo inspectImage(String string) {
throw new IllegalStateException(DISCONNECTED);
}
示例3: getPropertyValue
import com.spotify.docker.client.messages.ImageInfo; //导入依赖的package包/类
@Override
public Object getPropertyValue(Object arg0) {
ImageInfo info = dockerImageElement.getImageInfo();
return info;
}
示例4: getImageInfo
import com.spotify.docker.client.messages.ImageInfo; //导入依赖的package包/类
public ImageInfo getImageInfo() {
return imageInfo;
}
示例5: setImageInfo
import com.spotify.docker.client.messages.ImageInfo; //导入依赖的package包/类
public void setImageInfo(ImageInfo imageInfo) {
this.imageInfo = imageInfo;
}
示例6: listImages
import com.spotify.docker.client.messages.ImageInfo; //导入依赖的package包/类
void listImages(BiConsumer<com.spotify.docker.client.messages.Image, ImageInfo> action) throws Exception;