   # map container names to actual container definitions
   for containerName in containers
     container = config.containers[containerName]
+
+    if not container
+      throw new Error("Container #{containerName} does not exist")
+
     containerDetails[containerName] = container
 
-    # some dependencies might not be listed in the cluster but still need
-    # to be resolved
+    # dependencies might not be listed in the cluster but still
+    # need to be resolved
     for dependency in container.dependencies
       if not containerDetails[dependency]
         containerDetails[dependency] = config.containers[dependency]

      for v,k in val
        if object.group
          v += ".#{object.group}"
        # we trust that the aliases array has the correct matching
        # indices here such that alias[k] is the correct alias for dependencies[k]
        alias = object.aliases[k]
        arg = [].concat arg, ["-link #{v}:#{alias}"]


  # merge group overrides if present
  for _, container of containerDetails
    container.originalName = container.name

    if groupName
      container.group = groupName
      container.name += ".#{groupName}"
