return PortMapping.parse(bindPorts);
}
public ContainerConfig createContainerConfig() {
ContainerConfig containerConfig = new ContainerConfig();
containerConfig.setImage(image);
if (hostname != null && !hostname.isEmpty()) {
containerConfig.setHostName(hostname);
}
String[] cmd = getDockerCommandArray();
if( cmd.length > 0)
containerConfig.setCmd(cmd);
containerConfig.setPortSpecs(new String[]{"22/tcp"});
//containerConfig.setPortSpecs(new String[]{"22/tcp"});
//containerConfig.getExposedPorts().put("22/tcp",new ExposedPort());
if( dnsHosts.length > 0 )
containerConfig.setDns(dnsHosts);
if( volumesFrom != null && !volumesFrom.isEmpty() )
containerConfig.setVolumesFrom(volumesFrom);
return containerConfig;
}