Package com.nirima.docker.client.model

Examples of com.nirima.docker.client.model.HostConfig


        ContainerCreateResponse container = dockerClient.containers().create(containerConfig);

        // Launch it.. :

        HostConfig hostConfig = createHostConfig();

        dockerClient.container(container.getId()).start(hostConfig);

        String containerId = container.getId();
View Full Code Here


        return containerConfig;
    }

    public HostConfig createHostConfig() {
        HostConfig hostConfig = new HostConfig();

        hostConfig.setPortBindings( getPortMappings() );
        hostConfig.setPublishAllPorts( bindAllPorts );


        hostConfig.setPrivileged(this.privileged);
        if( dnsHosts.length > 0 )
            hostConfig.setDns(dnsHosts);

        if (volumes.length > 0)
            hostConfig.setBinds(volumes);

        List<HostConfig.LxcConf> temp = getLxcConf(hostConfig);

        if (!temp.isEmpty())
            hostConfig.setLxcConf(temp.toArray(new HostConfig.LxcConf[temp.size()]));

        if(!Strings.isNullOrEmpty(volumesFrom) )
            hostConfig.setVolumesFrom(new String[] {volumesFrom});

        return hostConfig;
    }
View Full Code Here

TOP

Related Classes of com.nirima.docker.client.model.HostConfig

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.