Set domain name
@@ -145,6 +145,7 @@ class CreateContainerCommandImpl implements Docker.CreateContainerCommand {
.createContainerCmd(dockerImage.asString())
.withName(containerName.asString())
.withHostName(hostName)
+ .withDomainName(findDomainName(hostName))
.withLabels(labels)
.withEnv(environmentAssignments)
.withBinds(volumeBinds)
@@ -219,4 +220,8 @@ class CreateContainerCommandImpl implements Docker.CreateContainerCommand {
return sb.substring(1);
}
+
+ private String findDomainName(String hostName) {
+ return hostName.substring(hostName.indexOf(".") + 1);
+ }
}
