当前位置: 首页>>代码示例>>Java>>正文


Java TagImageCmd类代码示例

本文整理汇总了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;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:12,代码来源:TagImageCmdExec.java

示例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;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:12,代码来源:TagImageCmdExec.java

示例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;

}
 
开发者ID:HydAu,项目名称:Camel,代码行数:33,代码来源:DockerProducer.java

示例4: createTagImageCmdExec

import com.github.dockerjava.api.command.TagImageCmd; //导入依赖的package包/类
@Override
public TagImageCmd.Exec createTagImageCmdExec() {
    return new TagImageCmdExec(getBaseResource(), getDockerClientConfig());
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:5,代码来源:JerseyDockerCmdExecFactory.java

示例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);
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:5,代码来源:DockerClientImpl.java

示例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);
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:7,代码来源:TagImageCmdImpl.java

示例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;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:7,代码来源:TagImageCmdImpl.java

示例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;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:7,代码来源:TagImageCmdImpl.java

示例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;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:7,代码来源:TagImageCmdImpl.java

示例10: withForce

import com.github.dockerjava.api.command.TagImageCmd; //导入依赖的package包/类
@Override
public TagImageCmd withForce() {
    return withForce(true);
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:5,代码来源:TagImageCmdImpl.java

示例11: createTagImageCmdExec

import com.github.dockerjava.api.command.TagImageCmd; //导入依赖的package包/类
@Override
public TagImageCmd.Exec createTagImageCmdExec() {
    return delegate.createTagImageCmdExec();
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:5,代码来源:TestDockerCmdExecFactory.java

示例12: tagImageCmd

import com.github.dockerjava.api.command.TagImageCmd; //导入依赖的package包/类
TagImageCmd tagImageCmd(String imageId, String imageNameWithRepository, String tag); 
开发者ID:docker-java,项目名称:docker-java,代码行数:2,代码来源:DockerClient.java


注:本文中的com.github.dockerjava.api.command.TagImageCmd类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。