Package org.jclouds.docker.domain

Examples of org.jclouds.docker.domain.Config$Builder


         for (String containerDir : templateOptions.getVolumes().get().values()) {
            volumes.put(containerDir, Maps.newHashMap());
         }
         containerConfigBuilder.volumes(volumes);
      }
      Config containerConfig = containerConfigBuilder.build();

      logger.debug(">> creating new container with containerConfig(%s)", containerConfig);
      Container container = api.getRemoteApi().createContainer(name, containerConfig);
      logger.trace("<< container(%s)", container.getId());
View Full Code Here


      assertNotNull(api().listImages());
   }

   @Test(dependsOnMethods = "testListImages")
   public void testCreateContainer() throws IOException, InterruptedException {
      Config containerConfig = Config.builder().imageId(image.getId())
              .cmd(ImmutableList.of("/bin/sh", "-c", "while true; do echo hello world; sleep 1; done"))
              .build();
      container = api().createContainer("testCreateContainer", containerConfig);
      assertNotNull(container);
      assertNotNull(container.getId());
View Full Code Here

      MockWebServer server = mockWebServer();
      server.enqueue(new MockResponse().setBody(payloadFromResource("/container-creation.json")));

      DockerApi api = api(server.getUrl("/"));
      RemoteApi remoteApi = api.getRemoteApi();
      Config containerConfig = Config.builder().cmd(ImmutableList.of("date"))
              .attachStdin(false)
              .attachStderr(true)
              .attachStdout(true)
              .tty(false)
              .imageId("base")
View Full Code Here

   private Container container;

   @BeforeMethod
   public void setup() {
      Config containerConfig = Config.builder()
              .hostname("6d35806c1bd2")
              .domainName("")
              .user("")
              .memory(0)
              .memorySwap(0)
View Full Code Here

         for (String containerDir : templateOptions.getVolumes().get().values()) {
            volumes.put(containerDir, Maps.newHashMap());
         }
         containerConfigBuilder.volumes(volumes);
      }
      Config containerConfig = containerConfigBuilder.build();

      logger.debug(">> creating new container with containerConfig(%s)", containerConfig);
      Container container = api.getRemoteApi().createContainer(name, containerConfig);
      logger.trace("<< container(%s)", container.getId());
View Full Code Here

TOP

Related Classes of org.jclouds.docker.domain.Config$Builder

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.