本文整理汇总了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;
}
开发者ID:meridor,项目名称:perspective-backend,代码行数:33,代码来源:ListImagesOperation.java
示例2: inspectImage
import com.spotify.docker.client.messages.ImageInfo; //导入依赖的package包/类
@Override
public ImageInfo inspectImage(String string) {
throw new IllegalStateException(DISCONNECTED);
}
开发者ID:amihaiemil,项目名称:comdor,代码行数:5,代码来源:Disconnected.java
示例3: getPropertyValue
import com.spotify.docker.client.messages.ImageInfo; //导入依赖的package包/类
@Override
public Object getPropertyValue(Object arg0) {
ImageInfo info = dockerImageElement.getImageInfo();
return info;
}
开发者ID:osswangxining,项目名称:dockerfoundry,代码行数:6,代码来源:DockerImageElementPropertySource.java
示例4: getImageInfo
import com.spotify.docker.client.messages.ImageInfo; //导入依赖的package包/类
public ImageInfo getImageInfo() {
return imageInfo;
}
开发者ID:osswangxining,项目名称:dockerfoundry,代码行数:4,代码来源:DockerImageElement.java
示例5: setImageInfo
import com.spotify.docker.client.messages.ImageInfo; //导入依赖的package包/类
public void setImageInfo(ImageInfo imageInfo) {
this.imageInfo = imageInfo;
}
开发者ID:osswangxining,项目名称:dockerfoundry,代码行数:4,代码来源:DockerImageElement.java
示例6: listImages
import com.spotify.docker.client.messages.ImageInfo; //导入依赖的package包/类
void listImages(BiConsumer<com.spotify.docker.client.messages.Image, ImageInfo> action) throws Exception;
开发者ID:meridor,项目名称:perspective-backend,代码行数:2,代码来源:Api.java
注:本文中的com.spotify.docker.client.messages.ImageInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论