"; if ($c['NetworkSettings']['Ports']) { foreach ($c['NetworkSettings']['Ports'] as $from => $to) { if ($to) foreach ($to as $p) { if (isset($p['HostPort'])) $ports.="
  • -p ".($p['HostIp']&&$p['HostIp']!="0.0.0.0"?$p['HostIp'].":":"").$p['HostPort'].':'.$from.'
  • '; } } } elseif ($c['HostConfig']['PortBindings']) { foreach ($c['HostConfig']['PortBindings'] as $from => $to) { if ($to) foreach ($to as $p) { if (isset($p['HostPort'])) $ports.="
  • -p ".($p['HostIp']&&$p['HostIp']!="0.0.0.0"?$p['HostIp'].":":"").$p['HostPort'].':'.$from.'
  • '; } } } $ports .= ""; $volumes = "?"; $links = ""; $envs = ""; $image = $c['Config']['Image']; $command = ""; if ($c['Config']['Cmd']) $command = join(" ", $c['Config']['Cmd']); $status="dead"; if ($c['State']['Dead']) $status = "dead"; elseif ($c['State']['Restarting']) $status = "restarted"; elseif ($c['State']['Paused']) $status = "paused"; elseif ($c['State']['Running']) $status = "running"; echo ''."\n"; } echo "
    NamePortsVolumesLinksEnvironmentsImageCommand
    '.$name.''.$ports.''.$volumes.''.$links.''.$envs.''.$image.''.$command.'
    "; echo'
    '; exec('docker logs '.$container, $logs, $ret); echo "
    \n".join("\n", $logs)."\n
    "; echo'
    '; echo "
    \n".join("\n", $res)."\n
    "; echo'
    '; ?>