Package com.kpelykh.docker.client.model

Examples of com.kpelykh.docker.client.model.ImageInspectResponse


    final List<Image> images = docker.getImages(imageName(id), true);
    return images.isEmpty() ? null : images.get(0);
  }

  String getImageId(Id id) throws DockerException {
    ImageInspectResponse image = docker.inspectImage(imageName(id));
    return image.getId();
  }
View Full Code Here


    LOG.info("Client info after pull, {}", info.toString());

    // TODO: imgCount should differ (maybe a docker bug?)
    assertThat(imgCount, lessThanOrEqualTo(info.getImages()));

    ImageInspectResponse imageInspectResponse = dockerClient
        .inspectImage(testImage);
    LOG.info("Image Inspect: {}", imageInspectResponse.toString());
    assertThat(imageInspectResponse, notNullValue());
  }
View Full Code Here

    LOG.info("Commiting container: {}", container.toString());
    String imageId = dockerClient
        .commit(new CommitConfig(container.getId()));
    tmpImgs.add(imageId);

    ImageInspectResponse imageInspectResponse = dockerClient
        .inspectImage(imageId);
    LOG.info("Image Inspect: {}", imageInspectResponse.toString());

    assertThat(imageInspectResponse,
        hasField("container", startsWith(container.getId())));
    assertThat(imageInspectResponse.getContainerConfig().getImage(),
        equalTo("busybox"));

    ImageInspectResponse busyboxImg = dockerClient.inspectImage("busybox");

    assertThat(imageInspectResponse.getParent(),
        equalTo(busyboxImg.getId()));
  }
View Full Code Here

    assertThat(fullLog, containsString("Successfully built"));

    String imageId = StringUtils.substringBetween(fullLog,
        "Successfully built ", "\\n\"}").trim();

    ImageInspectResponse imageInspectResponse = dockerClient
        .inspectImage(imageId);
    assertThat(imageInspectResponse, not(nullValue()));
    LOG.info("Image Inspect: {}", imageInspectResponse.toString());
    tmpImgs.add(imageInspectResponse.getId());

    assertThat(imageInspectResponse.getAuthor(),
        equalTo("Guillaume J. Charmes \"guillaume@dotcloud.com\""));
  }
View Full Code Here

    assertThat(fullLog, containsString("Successfully built"));

    String imageId = StringUtils.substringBetween(fullLog,
        "Successfully built ", "\\n\"}").trim();

    ImageInspectResponse imageInspectResponse = dockerClient
        .inspectImage(imageId);
    assertThat(imageInspectResponse, not(nullValue()));
    LOG.info("Image Inspect: {}", imageInspectResponse.toString());
    tmpImgs.add(imageInspectResponse.getId());

    ContainerConfig containerConfig = new ContainerConfig();
    containerConfig.setImage(imageInspectResponse.getId());
    ContainerCreateResponse container = dockerClient
        .createContainer(containerConfig);
    assertThat(container.getId(), not(isEmptyString()));
    dockerClient.startContainer(container.getId());
    tmpContainers.add(container.getId());
View Full Code Here

TOP

Related Classes of com.kpelykh.docker.client.model.ImageInspectResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.