.putIfNotNull("hardwareId", hardwareId)
.build();
DynamicCluster cluster = dockerHost.getDockerContainerCluster();
Entity added = cluster.addNode(machine, containerFlags);
if (added == null) {
throw new NoMachinesAvailableException(String.format("Failed to create container at %s", dockerHost.getDockerHostName()));
} else {
Entities.start(added, ImmutableList.of(machine));
}
DockerContainer dockerContainer = (DockerContainer) added;