Package com.kpelykh.docker.client.model

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


   * ##################### ## CONTAINER TESTS ## #####################
   */

  @Test
  public void testCreateContainer() throws DockerException {
    ContainerConfig containerConfig = new ContainerConfig();
    containerConfig.setImage("busybox");
    containerConfig.setCmd(new String[] { "true" });

    ContainerCreateResponse container = dockerClient
        .createContainer(containerConfig);

    LOG.info("Created container {}", container.toString());
View Full Code Here


  }

  @Test
  public void testStartContainer() throws DockerException {

    ContainerConfig containerConfig = new ContainerConfig();
    containerConfig.setImage("busybox");
    containerConfig.setCmd(new String[] { "true" });

    ContainerCreateResponse container = dockerClient
        .createContainer(containerConfig);
    LOG.info("Created container {}", container.toString());
    assertThat(container.getId(), not(isEmptyString()));
View Full Code Here

  }

  @Test
  public void testWaitContainer() throws DockerException {

    ContainerConfig containerConfig = new ContainerConfig();
    containerConfig.setImage("busybox");
    containerConfig.setCmd(new String[] { "true" });

    ContainerCreateResponse container = dockerClient
        .createContainer(containerConfig);
    LOG.info("Created container: {}", container.toString());
    assertThat(container.getId(), not(isEmptyString()));
View Full Code Here

  @Test
  public void testLogs() throws DockerException, IOException {

    String snippet = "hello world";

    ContainerConfig containerConfig = new ContainerConfig();
    containerConfig.setImage("busybox");
    containerConfig.setCmd(new String[] { "/bin/echo", snippet });

    ContainerCreateResponse container = dockerClient
        .createContainer(containerConfig);
    LOG.info("Created container: {}", container.toString());
    assertThat(container.getId(), not(isEmptyString()));
View Full Code Here

    assertThat(logResponseStream(response), endsWith(snippet));
  }

  @Test
  public void testDiff() throws DockerException {
    ContainerConfig containerConfig = new ContainerConfig();
    containerConfig.setImage("busybox");
    containerConfig.setCmd(new String[] { "touch", "/test" });

    ContainerCreateResponse container = dockerClient
        .createContainer(containerConfig);
    LOG.info("Created container: {}", container.toString());
    assertThat(container.getId(), not(isEmptyString()));
View Full Code Here

  }

  @Test
  public void testStopContainer() throws DockerException {

    ContainerConfig containerConfig = new ContainerConfig();
    containerConfig.setImage("busybox");
    containerConfig.setCmd(new String[] { "sleep", "9999" });

    ContainerCreateResponse container = dockerClient
        .createContainer(containerConfig);
    LOG.info("Created container: {}", container.toString());
    assertThat(container.getId(), not(isEmptyString()));
View Full Code Here

TOP

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

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.