本文整理汇总了Java中com.github.dockerjava.api.command.TagImageCmd类的典型用法代码示例。如果您正苦于以下问题:Java TagImageCmd类的具体用法?Java TagImageCmd怎么用?Java TagImageCmd使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TagImageCmd类属于com.github.dockerjava.api.command包,在下文中一共展示了TagImageCmd类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import com.github.dockerjava.api.command.TagImageCmd; //导入依赖的package包/类
@Override
protected Void execute(TagImageCmd command) {
WebTarget webTarget = getBaseResource().path("/images/" + command.getImageId() + "/tag")
.queryParam("repo", command.getRepository()).queryParam("tag", command.getTag());
webTarget = booleanQueryParam(webTarget, "force", command.hasForceEnabled());
LOGGER.trace("POST: {}", webTarget);
webTarget.request().post(null).close();
return null;
}
示例2: execute
import com.github.dockerjava.api.command.TagImageCmd; //导入依赖的package包/类
@Override
protected Void execute(TagImageCmd command) {
WebTarget webTarget = getBaseResource().path("/images/" + command.getImageId() + "/tag")
.queryParam("repo", command.getRepository()).queryParam("tag", command.getTag());
webTarget = booleanQueryParam(webTarget, "force", command.hasForceEnabled());
LOGGER.trace("POST: {}", webTarget);
webTarget.request().post(null);
return null;
}
示例3: executeTagImageRequest
import com.github.dockerjava.api.command.TagImageCmd; //导入依赖的package包/类
/**
* Produces a tag image request
*
* @param client
* @param message
* @return
*/
private TagImageCmd executeTagImageRequest(DockerClient client, Message message) {
LOGGER.debug("Executing Docker Tag Image Request");
String imageId = DockerHelper.getProperty(DockerConstants.DOCKER_IMAGE_ID, configuration, message, String.class);
String repository = DockerHelper.getProperty(DockerConstants.DOCKER_REPOSITORY, configuration, message, String.class);
String tag = DockerHelper.getProperty(DockerConstants.DOCKER_TAG, configuration, message, String.class);
if (imageId == null || repository == null || tag == null) {
throw new IllegalArgumentException("ImageId, repository and tag must be specified");
}
TagImageCmd tagImageCmd = client.tagImageCmd(imageId, repository, tag);
Boolean force = DockerHelper.getProperty(DockerConstants.DOCKER_FORCE, configuration, message, Boolean.class);
if (force != null) {
tagImageCmd.withForce(force);
}
return tagImageCmd;
}
示例4: createTagImageCmdExec
import com.github.dockerjava.api.command.TagImageCmd; //导入依赖的package包/类
@Override
public TagImageCmd.Exec createTagImageCmdExec() {
return new TagImageCmdExec(getBaseResource(), getDockerClientConfig());
}
示例5: tagImageCmd
import com.github.dockerjava.api.command.TagImageCmd; //导入依赖的package包/类
@Override
public TagImageCmd tagImageCmd(String imageId, String imageNameWithRepository, String tag) {
return new TagImageCmdImpl(getDockerCmdExecFactory().createTagImageCmdExec(), imageId, imageNameWithRepository, tag);
}
示例6: TagImageCmdImpl
import com.github.dockerjava.api.command.TagImageCmd; //导入依赖的package包/类
public TagImageCmdImpl(TagImageCmd.Exec exec, String imageId, String repository, String tag) {
super(exec);
withImageId(imageId);
withRepository(repository);
withTag(tag);
}
示例7: withImageId
import com.github.dockerjava.api.command.TagImageCmd; //导入依赖的package包/类
@Override
public TagImageCmd withImageId(String imageId) {
checkNotNull(imageId, "imageId was not specified");
this.imageId = imageId;
return this;
}
示例8: withRepository
import com.github.dockerjava.api.command.TagImageCmd; //导入依赖的package包/类
@Override
public TagImageCmd withRepository(String repository) {
checkNotNull(repository, "repository was not specified");
this.repository = repository;
return this;
}
示例9: withTag
import com.github.dockerjava.api.command.TagImageCmd; //导入依赖的package包/类
@Override
public TagImageCmd withTag(String tag) {
checkNotNull(tag, "tag was not specified");
this.tag = tag;
return this;
}
示例10: withForce
import com.github.dockerjava.api.command.TagImageCmd; //导入依赖的package包/类
@Override
public TagImageCmd withForce() {
return withForce(true);
}
示例11: createTagImageCmdExec
import com.github.dockerjava.api.command.TagImageCmd; //导入依赖的package包/类
@Override
public TagImageCmd.Exec createTagImageCmdExec() {
return delegate.createTagImageCmdExec();
}
示例12: tagImageCmd
import com.github.dockerjava.api.command.TagImageCmd; //导入依赖的package包/类
TagImageCmd tagImageCmd(String imageId, String imageNameWithRepository, String tag);