Search in sources :

Example 16 with Container

use of com.spotify.docker.client.messages.Container in project helios by spotify.

the class ZooKeeperClusterIdTest method testAgent.

@Test
public void testAgent() throws Exception {
    startDefaultMaster("--zk-cluster-id=" + zkClusterId);
    startDefaultAgent(testHost(), "--zk-cluster-id=" + zkClusterId);
    awaitHostStatus(testHost(), UP, LONG_WAIT_SECONDS, SECONDS);
    // Create job and deploy it
    final JobId jobId = createJob(testJobName, testJobVersion, BUSYBOX, IDLE_COMMAND);
    deployJob(jobId, testHost());
    final TaskStatus runningStatus = awaitTaskState(jobId, testHost(), RUNNING);
    final String containerId = runningStatus.getContainerId();
    // Delete the config node which contains the cluster ID and all the job definitions
    zk().curatorWithSuperAuth().delete().deletingChildrenIfNeeded().forPath("/config");
    // Sleep for a second so agent has a chance to react to deletion
    Thread.sleep(1000);
    // Make sure the agent didn't stop the job
    try (final DockerClient docker = getNewDockerClient()) {
        final List<Container> containers = docker.listContainers();
        final CustomTypeSafeMatcher<Container> containerIdMatcher = new CustomTypeSafeMatcher<Container>("Container with id " + containerId) {

            @Override
            protected boolean matchesSafely(Container container) {
                return container.id().equals(containerId);
            }
        };
        assertContainersMatch(containers, containerIdMatcher);
    }
}
Also used : Container(com.spotify.docker.client.messages.Container) DockerClient(com.spotify.docker.client.DockerClient) CustomTypeSafeMatcher(org.hamcrest.CustomTypeSafeMatcher) Matchers.containsString(org.hamcrest.Matchers.containsString) TaskStatus(com.spotify.helios.common.descriptors.TaskStatus) JobId(com.spotify.helios.common.descriptors.JobId) Test(org.junit.Test)

Example 17 with Container

use of com.spotify.docker.client.messages.Container in project helios by spotify.

the class DeploymentTest method testLotsOfConcurrentJobs.

@Test
public void testLotsOfConcurrentJobs() throws Exception {
    startDefaultMaster();
    final HeliosClient client = defaultClient();
    startDefaultAgent(testHost());
    awaitHostRegistered(client, testHost(), LONG_WAIT_SECONDS, SECONDS);
    awaitHostStatus(client, testHost(), UP, LONG_WAIT_SECONDS, SECONDS);
    final int numberOfJobs = 40;
    final List<JobId> jobIds = Lists.newArrayListWithCapacity(numberOfJobs);
    final String jobName = testJobName + "_" + toHexString(ThreadLocalRandom.current().nextInt());
    // create and deploy a bunch of jobs
    for (Integer i = 0; i < numberOfJobs; i++) {
        final Job job = Job.newBuilder().setName(jobName).setVersion(i.toString()).setImage(BUSYBOX).setCommand(IDLE_COMMAND).setCreatingUser(TEST_USER).build();
        final JobId jobId = job.getId();
        final CreateJobResponse created = client.createJob(job).get();
        assertEquals(CreateJobResponse.Status.OK, created.getStatus());
        final Deployment deployment = Deployment.of(jobId, START, TEST_USER);
        final JobDeployResponse deployed = client.deploy(deployment, testHost()).get();
        assertEquals(JobDeployResponse.Status.OK, deployed.getStatus());
        jobIds.add(jobId);
    }
    // get the container ID's for the jobs
    final Set<String> containerIds = Sets.newHashSetWithExpectedSize(numberOfJobs);
    for (final JobId jobId : jobIds) {
        final TaskStatus taskStatus = awaitJobState(client, testHost(), jobId, RUNNING, LONG_WAIT_SECONDS, SECONDS);
        containerIds.add(taskStatus.getContainerId());
    }
    try (final DockerClient dockerClient = getNewDockerClient()) {
        // kill all the containers for the jobs
        for (final String containerId : containerIds) {
            dockerClient.killContainer(containerId);
        }
        // make sure all the containers come back up
        final int restartedContainers = Polling.await(LONG_WAIT_SECONDS, SECONDS, new Callable<Integer>() {

            @Override
            public Integer call() throws Exception {
                int matchingContainerCount = 0;
                for (final Container c : dockerClient.listContainers()) {
                    for (final String name : c.names()) {
                        if (name.contains(jobName)) {
                            matchingContainerCount++;
                        }
                    }
                }
                if (matchingContainerCount < containerIds.size()) {
                    return null;
                } else {
                    return matchingContainerCount;
                }
            }
        });
        assertEquals(numberOfJobs, restartedContainers);
    }
}
Also used : DockerClient(com.spotify.docker.client.DockerClient) Deployment(com.spotify.helios.common.descriptors.Deployment) Integer.toHexString(java.lang.Integer.toHexString) HeliosClient(com.spotify.helios.client.HeliosClient) TaskStatus(com.spotify.helios.common.descriptors.TaskStatus) JobDeployResponse(com.spotify.helios.common.protocol.JobDeployResponse) Container(com.spotify.docker.client.messages.Container) CreateJobResponse(com.spotify.helios.common.protocol.CreateJobResponse) Job(com.spotify.helios.common.descriptors.Job) JobId(com.spotify.helios.common.descriptors.JobId) Test(org.junit.Test)

Example 18 with Container

use of com.spotify.docker.client.messages.Container in project azure-tools-for-java by Microsoft.

the class DockerHostRunState method executeSteps.

@Override
public String executeSteps(@NotNull RunProcessHandler processHandler, @NotNull Operation operation) throws Exception {
    final String[] runningContainerId = { null };
    processHandler.addProcessListener(new ProcessListener() {

        @Override
        public void startNotified(ProcessEvent processEvent) {
        }

        @Override
        public void processTerminated(ProcessEvent processEvent) {
        }

        @Override
        public void processWillTerminate(ProcessEvent processEvent, boolean b) {
            try {
                DockerClient docker = DockerUtil.getDockerClient(dataModel.getDockerHost(), dataModel.isTlsEnabled(), dataModel.getDockerCertPath());
                DockerUtil.stopContainer(docker, runningContainerId[0]);
            } catch (Exception e) {
            // ignore
            }
        }

        @Override
        public void onTextAvailable(ProcessEvent processEvent, Key key) {
        }
    });
    processHandler.setText("Starting job ...  ");
    String basePath = project.getBasePath();
    if (basePath == null) {
        processHandler.println("Project base path is null.", ProcessOutputTypes.STDERR);
        throw new FileNotFoundException("Project base path is null.");
    }
    // locate artifact to specified location
    String targetFilePath = dataModel.getTargetPath();
    processHandler.setText(String.format("Locating artifact ... [%s]", targetFilePath));
    // validate dockerfile
    Path targetDockerfile = Paths.get(dataModel.getDockerFilePath());
    processHandler.setText(String.format("Validating dockerfile ... [%s]", targetDockerfile));
    if (!targetDockerfile.toFile().exists()) {
        throw new FileNotFoundException("Dockerfile not found.");
    }
    // replace placeholder if exists
    String content = new String(Files.readAllBytes(targetDockerfile));
    content = content.replaceAll(Constant.DOCKERFILE_ARTIFACT_PLACEHOLDER, Paths.get(basePath).toUri().relativize(Paths.get(targetFilePath).toUri()).getPath());
    Files.write(targetDockerfile, content.getBytes());
    // build image
    String imageNameWithTag = String.format("%s:%s", dataModel.getImageName(), dataModel.getTagName());
    processHandler.setText(String.format("Building image ...  [%s]", imageNameWithTag));
    DockerClient docker = DockerUtil.getDockerClient(dataModel.getDockerHost(), dataModel.isTlsEnabled(), dataModel.getDockerCertPath());
    DockerUtil.ping(docker);
    DockerUtil.buildImage(docker, imageNameWithTag, targetDockerfile.getParent(), targetDockerfile.getFileName().toString(), new DockerProgressHandler(processHandler));
    // docker run
    String containerServerPort = getPortFromDockerfile(content);
    if (StringUtils.isBlank(containerServerPort)) {
        if (StringUtils.endsWith(targetFilePath, MavenConstants.TYPE_WAR)) {
            containerServerPort = "80";
        } else {
            containerServerPort = "8080";
        }
    }
    String containerId = DockerUtil.createContainer(docker, String.format("%s:%s", dataModel.getImageName(), dataModel.getTagName()), containerServerPort);
    runningContainerId[0] = containerId;
    Container container = DockerUtil.runContainer(docker, containerId);
    // props
    String hostname = new URI(dataModel.getDockerHost()).getHost();
    String publicPort = null;
    ImmutableList<Container.PortMapping> ports = container.ports();
    if (ports != null) {
        for (Container.PortMapping portMapping : ports) {
            if (StringUtils.equals(containerServerPort, String.valueOf(portMapping.privatePort()))) {
                publicPort = String.valueOf(portMapping.publicPort());
            }
        }
    }
    processHandler.setText(String.format(Constant.MESSAGE_CONTAINER_STARTED, (hostname != null ? hostname : "localhost") + (publicPort != null ? ":" + publicPort : "")));
    return null;
}
Also used : Path(java.nio.file.Path) DockerProgressHandler(com.microsoft.azure.toolkit.intellij.webapp.docker.utils.DockerProgressHandler) DockerClient(com.spotify.docker.client.DockerClient) ProcessEvent(com.intellij.execution.process.ProcessEvent) ProcessListener(com.intellij.execution.process.ProcessListener) FileNotFoundException(java.io.FileNotFoundException) URI(java.net.URI) FileNotFoundException(java.io.FileNotFoundException) Container(com.spotify.docker.client.messages.Container) Key(com.intellij.openapi.util.Key)

Example 19 with Container

use of com.spotify.docker.client.messages.Container in project zalenium by zalando.

the class DockerContainerMock method getMockedDockerContainerClient.

@SuppressWarnings("ConstantConditions")
public static DockerContainerClient getMockedDockerContainerClient(String networkName) {
    DockerClient dockerClient = mock(DockerClient.class);
    ExecCreation execCreation = mock(ExecCreation.class);
    LogStream logStream = mock(LogStream.class);
    when(logStream.readFully()).thenReturn("ANY_STRING");
    when(execCreation.id()).thenReturn("ANY_ID");
    ContainerCreation containerCreation = mock(ContainerCreation.class);
    when(containerCreation.id()).thenReturn("ANY_CONTAINER_ID");
    AttachedNetwork attachedNetwork = mock(AttachedNetwork.class);
    NetworkSettings networkSettings = mock(NetworkSettings.class);
    HostConfig hostConfig = mock(HostConfig.class);
    ImageInfo imageInfo = mock(ImageInfo.class);
    ContainerConfig containerConfig = mock(ContainerConfig.class);
    ContainerInfo containerInfo = mock(ContainerInfo.class);
    ContainerMount tmpMountedMount = mock(ContainerMount.class);
    when(tmpMountedMount.destination()).thenReturn("/tmp/node/tmp/mounted");
    when(tmpMountedMount.source()).thenReturn("/tmp/mounted");
    ContainerMount homeFolderMount = mock(ContainerMount.class);
    when(homeFolderMount.destination()).thenReturn("/tmp/node/home/seluser/folder");
    when(homeFolderMount.source()).thenReturn("/tmp/folder");
    when(containerInfo.mounts()).thenReturn(ImmutableList.of(tmpMountedMount, homeFolderMount));
    when(attachedNetwork.ipAddress()).thenReturn("127.0.0.1");
    when(networkSettings.networks()).thenReturn(ImmutableMap.of(networkName, attachedNetwork));
    when(networkSettings.ipAddress()).thenReturn("");
    when(containerInfo.networkSettings()).thenReturn(networkSettings);
    when(hostConfig.extraHosts()).thenReturn(null);
    when(containerInfo.hostConfig()).thenReturn(hostConfig);
    String[] httpEnvVars = { "zalenium_http_proxy=http://34.211.100.239:8080", "zalenium_https_proxy=http://34.211.100.239:8080" };
    when(containerConfig.env()).thenReturn(ImmutableList.copyOf(Arrays.asList(httpEnvVars)));
    when(containerInfo.config()).thenReturn(containerConfig);
    String containerId = RandomStringUtils.randomAlphabetic(30).toLowerCase();
    Container container_40000 = mock(Container.class);
    when(container_40000.names()).thenReturn(ImmutableList.copyOf(Collections.singletonList("/zalenium_40000")));
    when(container_40000.id()).thenReturn(containerId);
    when(container_40000.status()).thenReturn("running");
    when(container_40000.image()).thenReturn("elgalu/selenium");
    Container container_40001 = mock(Container.class);
    when(container_40001.names()).thenReturn(ImmutableList.copyOf(Collections.singletonList("/zalenium_40001")));
    when(container_40001.id()).thenReturn(containerId);
    when(container_40001.status()).thenReturn("running");
    when(container_40001.image()).thenReturn("elgalu/selenium");
    String zaleniumContainerId = RandomStringUtils.randomAlphabetic(30).toLowerCase();
    Container zalenium = mock(Container.class);
    when(zalenium.names()).thenReturn(ImmutableList.copyOf(Collections.singletonList("/zalenium")));
    when(zalenium.id()).thenReturn(zaleniumContainerId);
    when(zalenium.status()).thenReturn("running");
    when(zalenium.image()).thenReturn("dosel/zalenium");
    Info dockerInfo = mock(Info.class);
    when(dockerInfo.name()).thenReturn("ubuntu_vm");
    try {
        URL logsLocation = TestUtils.class.getClassLoader().getResource("logs.tar");
        URL videosLocation = TestUtils.class.getClassLoader().getResource("videos.tar");
        File logsFile = new File(logsLocation.getPath());
        File videosFile = new File(videosLocation.getPath());
        when(dockerClient.archiveContainer(containerId, "/var/log/cont/")).thenReturn(new FileInputStream(logsFile));
        when(dockerClient.archiveContainer(containerId, "/videos/")).thenReturn(new FileInputStream(videosFile));
        String[] startVideo = { "bash", "-c", START_RECORDING.getContainerAction() };
        String[] stopVideo = { "bash", "-c", STOP_RECORDING.getContainerAction() };
        String[] transferLogs = { "bash", "-c", TRANSFER_LOGS.getContainerAction() };
        String[] cleanupContainer = { "bash", "-c", CLEANUP_CONTAINER.getContainerAction() };
        String[] sendNotificationCompleted = { "bash", "-c", SEND_NOTIFICATION.getContainerAction().concat(COMPLETED.getTestNotificationMessage()) };
        String[] sendNotificationTimeout = { "bash", "-c", SEND_NOTIFICATION.getContainerAction().concat(TIMEOUT.getTestNotificationMessage()) };
        when(dockerClient.execCreate(containerId, startVideo, DockerClient.ExecCreateParam.attachStdout(), DockerClient.ExecCreateParam.attachStderr(), DockerClient.ExecCreateParam.attachStdin())).thenReturn(execCreation);
        when(dockerClient.execCreate(containerId, stopVideo, DockerClient.ExecCreateParam.attachStdout(), DockerClient.ExecCreateParam.attachStderr(), DockerClient.ExecCreateParam.attachStdin())).thenReturn(execCreation);
        when(dockerClient.execCreate(containerId, transferLogs, DockerClient.ExecCreateParam.attachStdout(), DockerClient.ExecCreateParam.attachStderr(), DockerClient.ExecCreateParam.attachStdin())).thenReturn(execCreation);
        when(dockerClient.execCreate(containerId, cleanupContainer, DockerClient.ExecCreateParam.attachStdout(), DockerClient.ExecCreateParam.attachStderr(), DockerClient.ExecCreateParam.attachStdin())).thenReturn(execCreation);
        when(dockerClient.execCreate(containerId, sendNotificationCompleted, DockerClient.ExecCreateParam.attachStdout(), DockerClient.ExecCreateParam.attachStderr(), DockerClient.ExecCreateParam.attachStdin())).thenReturn(execCreation);
        when(dockerClient.execCreate(containerId, sendNotificationTimeout, DockerClient.ExecCreateParam.attachStdout(), DockerClient.ExecCreateParam.attachStderr(), DockerClient.ExecCreateParam.attachStdin())).thenReturn(execCreation);
        when(dockerClient.execStart(anyString())).thenReturn(logStream);
        doNothing().when(dockerClient).stopContainer(anyString(), anyInt());
        when(dockerClient.info()).thenReturn(dockerInfo);
        when(dockerClient.createContainer(any(ContainerConfig.class), anyString())).thenReturn(containerCreation);
        when(dockerClient.listContainers(DockerClient.ListContainersParam.allContainers())).thenReturn(Arrays.asList(container_40000, container_40001, zalenium));
        when(containerConfig.labels()).thenReturn(ImmutableMap.of("selenium_firefox_version", "52", "selenium_chrome_version", "58"));
        when(imageInfo.config()).thenReturn(containerConfig);
        when(dockerClient.inspectContainer(null)).thenReturn(containerInfo);
        when(dockerClient.inspectContainer(zaleniumContainerId)).thenReturn(containerInfo);
        when(dockerClient.inspectContainer(containerId)).thenReturn(containerInfo);
        when(dockerClient.inspectImage(anyString())).thenReturn(imageInfo);
        when(dockerClient.listImages(DockerClient.ListImagesParam.byName("elgalu/selenium"))).thenReturn(Collections.emptyList());
    } catch (DockerException | InterruptedException | IOException e) {
        e.printStackTrace();
    }
    DockerContainerClient dockerContainerClient = new DockerContainerClient();
    dockerContainerClient.setContainerClient(dockerClient);
    return dockerContainerClient;
}
Also used : DockerException(com.spotify.docker.client.exceptions.DockerException) DockerClient(com.spotify.docker.client.DockerClient) DockerContainerClient(de.zalando.ep.zalenium.container.DockerContainerClient) LogStream(com.spotify.docker.client.LogStream) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) IOException(java.io.IOException) Info(com.spotify.docker.client.messages.Info) ContainerInfo(com.spotify.docker.client.messages.ContainerInfo) ImageInfo(com.spotify.docker.client.messages.ImageInfo) URL(java.net.URL) FileInputStream(java.io.FileInputStream) AttachedNetwork(com.spotify.docker.client.messages.AttachedNetwork) ContainerConfig(com.spotify.docker.client.messages.ContainerConfig) ExecCreation(com.spotify.docker.client.messages.ExecCreation) ContainerCreation(com.spotify.docker.client.messages.ContainerCreation) NetworkSettings(com.spotify.docker.client.messages.NetworkSettings) Container(com.spotify.docker.client.messages.Container) HostConfig(com.spotify.docker.client.messages.HostConfig) ContainerInfo(com.spotify.docker.client.messages.ContainerInfo) ImageInfo(com.spotify.docker.client.messages.ImageInfo) File(java.io.File) ContainerMount(com.spotify.docker.client.messages.ContainerMount)

Example 20 with Container

use of com.spotify.docker.client.messages.Container in project zalenium by zalando.

the class DockerContainerClient method createContainer.

public ContainerCreationStatus createContainer(String zaleniumContainerName, String image, Map<String, String> envVars, String nodePort) {
    String containerName = generateContainerName(zaleniumContainerName, nodePort);
    loadMountedFolders(zaleniumContainerName);
    // In some environments the created containers need to be labeled so the platform can handle them. E.g. Rancher.
    loadSeleniumContainerLabels();
    loadPullSeleniumImageFlag();
    loadIsZaleniumPrivileged(zaleniumContainerName);
    loadStorageOpts(zaleniumContainerName);
    List<String> binds = generateMountedFolderBinds();
    binds.add("/dev/shm:/dev/shm");
    String noVncPort = envVars.get("NOVNC_PORT");
    String networkMode = getZaleniumNetwork(zaleniumContainerName);
    List<String> extraHosts = new ArrayList<>();
    extraHosts.add(String.format("%s:%s", DOCKER_FOR_MAC_LOCALHOST_NAME, DOCKER_FOR_MAC_LOCALHOST_IP));
    // Allows "--net=host" work. Only supported for Linux.
    if (DOCKER_NETWORK_HOST_MODE_NAME.equalsIgnoreCase(networkMode)) {
        envVars.put("SELENIUM_HUB_HOST", "127.0.0.1");
        envVars.put("SELENIUM_NODE_HOST", "127.0.0.1");
        envVars.put("PICK_ALL_RANDOM_PORTS", "true");
        try {
            String hostName = dockerClient.info().name();
            extraHosts.add(String.format("%s:%s", hostName, "127.0.1.0"));
        } catch (DockerException | InterruptedException e) {
            logger.debug(nodeId + " Error while getting host name", e);
        }
    }
    // Reflect extra hosts of the hub container
    final List<String> hubExtraHosts = getContainerExtraHosts(zaleniumContainerName);
    extraHosts.addAll(hubExtraHosts);
    HostConfig hostConfig = HostConfig.builder().appendBinds(binds).networkMode(networkMode).extraHosts(extraHosts).autoRemove(true).storageOpt(storageOpt).privileged(isZaleniumPrivileged).build();
    List<String> flattenedEnvVars = envVars.entrySet().stream().map(e -> e.getKey() + "=" + e.getValue()).collect(Collectors.toList());
    flattenedEnvVars.addAll(zaleniumHttpEnvVars);
    final String[] exposedPorts = { nodePort, noVncPort };
    ContainerConfig.Builder builder = ContainerConfig.builder().image(image).env(flattenedEnvVars).exposedPorts(exposedPorts).hostConfig(hostConfig);
    if (seleniumContainerLabels.size() > 0) {
        builder.labels(seleniumContainerLabels);
    }
    final ContainerConfig containerConfig = builder.build();
    try {
        if (pullSeleniumImage) {
            List<Image> images = dockerClient.listImages(DockerClient.ListImagesParam.byName(image));
            if (images.size() == 0) {
                // If the image has no tag, we add latest, otherwise we end up pulling all the images with that name.
                String imageToPull = image.lastIndexOf(':') > 0 ? image : image.concat(":latest");
                dockerClient.pull(imageToPull, new AnsiProgressHandler());
            }
        }
    } catch (DockerException | InterruptedException e) {
        logger.warn(nodeId + " Error while checking (and pulling) if the image is present", e);
        ga.trackException(e);
    }
    try {
        final ContainerCreation container = dockerClient.createContainer(containerConfig, containerName);
        dockerClient.startContainer(container.id());
        return new ContainerCreationStatus(true, containerName, nodePort);
    } catch (DockerException | InterruptedException e) {
        logger.warn(nodeId + " Error while starting a new container", e);
        ga.trackException(e);
        return new ContainerCreationStatus(false);
    }
}
Also used : DockerException(com.spotify.docker.client.exceptions.DockerException) ContainerMount(com.spotify.docker.client.messages.ContainerMount) Arrays(java.util.Arrays) ContainerConfig(com.spotify.docker.client.messages.ContainerConfig) Environment(de.zalando.ep.zalenium.util.Environment) ContainerInfo(com.spotify.docker.client.messages.ContainerInfo) URL(java.net.URL) AnsiProgressHandler(com.spotify.docker.client.AnsiProgressHandler) LoggerFactory(org.slf4j.LoggerFactory) GoogleAnalyticsApi(de.zalando.ep.zalenium.util.GoogleAnalyticsApi) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) LogStream(com.spotify.docker.client.LogStream) ArrayList(java.util.ArrayList) DockerClient(com.spotify.docker.client.DockerClient) DefaultDockerClient(com.spotify.docker.client.DefaultDockerClient) Map(java.util.Map) ContainerCreation(com.spotify.docker.client.messages.ContainerCreation) DockerException(com.spotify.docker.client.exceptions.DockerException) Logger(org.slf4j.Logger) DockerSeleniumStarterRemoteProxy(de.zalando.ep.zalenium.proxy.DockerSeleniumStarterRemoteProxy) AttachedNetwork(com.spotify.docker.client.messages.AttachedNetwork) ImmutableMap(com.google.common.collect.ImmutableMap) Collectors(java.util.stream.Collectors) Container(com.spotify.docker.client.messages.Container) List(java.util.List) ExecCreation(com.spotify.docker.client.messages.ExecCreation) Image(com.spotify.docker.client.messages.Image) Optional(java.util.Optional) VisibleForTesting(com.google.common.annotations.VisibleForTesting) HostConfig(com.spotify.docker.client.messages.HostConfig) InputStream(java.io.InputStream) ArrayList(java.util.ArrayList) Image(com.spotify.docker.client.messages.Image) ContainerConfig(com.spotify.docker.client.messages.ContainerConfig) ContainerCreation(com.spotify.docker.client.messages.ContainerCreation) AnsiProgressHandler(com.spotify.docker.client.AnsiProgressHandler) HostConfig(com.spotify.docker.client.messages.HostConfig)

Aggregations

Container (com.spotify.docker.client.messages.Container)21 DockerClient (com.spotify.docker.client.DockerClient)13 Test (org.junit.Test)8 ContainerCreation (com.spotify.docker.client.messages.ContainerCreation)7 ContainerInfo (com.spotify.docker.client.messages.ContainerInfo)7 DockerException (com.spotify.docker.client.exceptions.DockerException)6 ContainerConfig (com.spotify.docker.client.messages.ContainerConfig)6 Matchers.containsString (org.hamcrest.Matchers.containsString)6 HostConfig (com.spotify.docker.client.messages.HostConfig)4 Image (com.spotify.docker.client.messages.Image)4 DefaultDockerClient (com.spotify.docker.client.DefaultDockerClient)3 LogStream (com.spotify.docker.client.LogStream)3 ExecCreation (com.spotify.docker.client.messages.ExecCreation)3 ImageInfo (com.spotify.docker.client.messages.ImageInfo)3 HeliosClient (com.spotify.helios.client.HeliosClient)3 JobId (com.spotify.helios.common.descriptors.JobId)3 IOException (java.io.IOException)3 Integer.toHexString (java.lang.Integer.toHexString)3 ArrayList (java.util.ArrayList)3 IDockerContainer (org.eclipse.linuxtools.docker.core.IDockerContainer)3