From 53b225c492e4944a97d76ad9189c474558e2bff3 Mon Sep 17 00:00:00 2001 From: Andrew Kennedy Date: Fri, 10 Oct 2014 18:51:46 +0100 Subject: [PATCH] Set hostname in template options --- .../docker/compute/strategy/DockerComputeServiceAdapter.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apis/docker/src/main/java/org/jclouds/docker/compute/strategy/DockerComputeServiceAdapter.java b/apis/docker/src/main/java/org/jclouds/docker/compute/strategy/DockerComputeServiceAdapter.java index 7bbead38fa..a4bcd3a9da 100644 --- a/apis/docker/src/main/java/org/jclouds/docker/compute/strategy/DockerComputeServiceAdapter.java +++ b/apis/docker/src/main/java/org/jclouds/docker/compute/strategy/DockerComputeServiceAdapter.java @@ -100,6 +100,10 @@ public class DockerComputeServiceAdapter implements containerConfigBuilder.memory(templateOptions.getMemory().get()); } + if (templateOptions.getHostname().isPresent()) { + containerConfigBuilder.hostname(templateOptions.getHostname().get()); + } + if (templateOptions.getCpuShares().isPresent()) { containerConfigBuilder.cpuShares(templateOptions.getCpuShares().get()); }