
org.testifyproject.github.dockerjava.netty.exec.CreateImageCmdExec Maven / Gradle / Ivy
package org.testifyproject.testifyproject.github.dockerjava.netty.exec;
import org.testifyproject.slf4j.Logger;
import org.testifyproject.slf4j.LoggerFactory;
import org.testifyproject.testifyproject.fasterxml.jackson.core.type.TypeReference;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.CreateImageCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.CreateImageResponse;
import org.testifyproject.testifyproject.github.dockerjava.core.DockerClientConfig;
import org.testifyproject.testifyproject.github.dockerjava.netty.MediaType;
import org.testifyproject.testifyproject.github.dockerjava.netty.WebTarget;
public class CreateImageCmdExec extends AbstrSyncDockerCmdExec implements
CreateImageCmd.Exec {
private static final Logger LOGGER = LoggerFactory.getLogger(CreateImageCmdExec.class);
public CreateImageCmdExec(WebTarget baseResource, DockerClientConfig dockerClientConfig) {
super(baseResource, dockerClientConfig);
}
@Override
protected CreateImageResponse execute(CreateImageCmd org.testifyproject.testifyprojectmand) {
WebTarget webResource = getBaseResource().path("/images/create").queryParam("repo", org.testifyproject.testifyprojectmand.getRepository())
.queryParam("tag", org.testifyproject.testifyprojectmand.getTag()).queryParam("fromSrc", "-");
LOGGER.trace("POST: {}", webResource);
return webResource.request().accept(MediaType.APPLICATION_OCTET_STREAM)
.post(new TypeReference() {
}, org.testifyproject.testifyprojectmand.getImageStream());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy