docs: JsonObject toDockerPortBindingsJson() {
          Map<String, Integer> portMap = getContainerPortToHostPortMap();
          if (!portMap.isEmpty()) {
              JsonObject portBindings = new JsonObject();
              Map<String, String> bindToMap = getBindToHostMap();
  
              for (Map.Entry<String, Integer> entry : portMap.entrySet()) {
                  String containerPortSpec = entry.getKey();
                  Integer hostPort = entry.getValue();
  
                  JsonObject o = new JsonObject();
                  o.addProperty("HostPort", hostPort != null ? hostPort.toString() : "");
  
                  if (bindToMap.containsKey(containerPortSpec)) {
                      o.addProperty("HostIp", bindToMap.get(containerPortSpec));
                  }
  
                  JsonArray array = new JsonArray();
                  array.add(o);
  
                  portBindings.add(containerPortSpec, array);
              }
              return portBindings;
          } else {
              return null;
          }
      }