get docker information

@return array docker in array with label
494501
private function getDocker()
    {
        $result = array();
        $i = 0;

        foreach ($this->_lines as $line) {
            if ($i > 0) {
                $buffer = preg_split("/\s\s+/", $line);
                $result[$i]['Name'] = $buffer[0];
                $result[$i]['CPUUsage'] = str_replace(',', '.',trim($buffer[1],'%'));
                preg_match('/([\d\.]+)(B|KiB|MiB|GiB|TiB|PiB)\s+\/\s+([\d\.]+)(B|KiB|MiB|GiB|TiB|PiB)/', str_replace(',', '.',trim($buffer[2])), $tmpbuf);
                switch ($tmpbuf[2]) {
                    case 'B':
                        $result[$i]['MemoryUsed'] = $tmpbuf[1];
                        break;
                    case 'KiB':
                        $result[$i]['MemoryUsed'] = 1024*$tmpbuf[1];
                        break;
                    case 'MiB':
                        $result[$i]['MemoryUsed'] = 1024*1024*$tmpbuf[1];
                        break;
                    case 'GiB':
                        $result[$i]['MemoryUsed'] = 1024*1024*1024*$tmpbuf[1];
                        break;
                    case 'TiB':
                        $result[$i]['MemoryUsed'] = 1024*1024*1024*1024*$tmpbuf[1];
                        break;
                    case 'PiB':
                        $result[$i]['MemoryUsed'] = 1024*1024*1024*1024*1025*$tmpbuf[1];
                        break;
                }
                switch ($tmpbuf[4]) {
                    case 'B':
                        $result[$i]['MemoryLimit'] = $tmpbuf[3];
                        break;
                    case 'KiB':
                        $result[$i]['MemoryLimit'] = 1024*$tmpbuf[3];
                        break;
                    case 'MiB':
                        $result[$i]['MemoryLimit'] = 1024*1024*$tmpbuf[3];
                        break;
                    case 'GiB':
                        $result[$i]['MemoryLimit'] = 1024*1024*1024*$tmpbuf[3];
                        break;
                    case 'TiB':
                        $result[$i]['MemoryLimit'] = 1024*1024*1024*1024*$tmpbuf[3];
                        break;
                    case 'PiB':
                        $result[$i]['MemoryLimit'] = 1024*1024*1024*1024*1025*$tmpbuf[3];
                        break;
                }
                $result[$i]['MemoryUsage'] = str_replace(',', '.',trim($buffer[3],'%'));
                $result[$i]['NetIO'] = trim($buffer[4]);
                $result[$i]['BlockIO'] = trim($buffer[5]);
                $result[$i]['PIDs'] = trim($buffer[6]);
            }
            $i++;
        }

        return $result;
    }
407971
def _get_container_infos(config, container):
    '''
    
    '''
    client = _get_client(config)
    infos = None
    try:
        infos = _set_id(client.inspect_container(container))
    except Exception:
        pass
    return infos
1321011
public function toArray()
    {
        return [
            'name' => $this->name,
            'labels' => $this->labelsToRaw($this->getLabels()),
            'html-type' => $this->htmlType,
            'css-class' => $this->cssClass,
            'options' => $this->optionsToRaw($this->getOptions()),
            'html-value' => $this->htmlValue,
            'validation' => implode('|', $this->validationRules),
            'is-on-index' => $this->isOnIndexView,
            'is-on-show' => $this->isOnShowView,
            'is-on-form' => $this->isOnFormView,
            'data-type' => $this->getRawDataType(),
            'data-type-params' => $this->methodParams,
            'data-value' => $this->dataValue,
            'is-index' => $this->isIndex,
            'is-unique' => $this->isUnique,
            'is-primary' => $this->isPrimary,
            'comment' => $this->comment,
            'is-nullable' => $this->isNullable(),
            'is-header' => $this->isHeader,
            'is-unsigned' => $this->isUnsigned,
            'is-auto-increment' => $this->isAutoIncrement,
            'is-inline-options' => $this->isInlineOptions,
            'is-date' => $this->isDate,
            'date-format' => $this->dateFormat,
            'cast-as' => $this->castAs,
            'placeholder' => $this->labelsToRaw($this->getPlaceholders()),
            'delimiter' => $this->optionsDelimiter,
            'range' => $this->range,
            'foreign-relation' => $this->getForeignRelationToRaw(),
            'foreign-constraint' => $this->getForeignConstraintToRaw(),
            'on-store' => $this->onStore,
            'on-update' => $this->onUpdate,
        ];
    }
453993
private function getAllInfo()
    {
        $data = [];
        foreach ($this->_parser->find('.genre-list a') as $each_studio) {
            $studio = [];

            $studio['id'] = $this->getProducerId($each_studio);
            $studio['name'] = $this->getProducerName($each_studio);
            $studio['count'] = $this->getProducerCount($each_studio);

            $data[] = $studio;
        }

        return $data;
    }
303242
public function info()
    {
        return [
            'gerrit' => [
                'hostUri' => $this->hostUri,
                'gerritProject' => $this->gerritProject,
                'revisionId' => $this->revisionId,
                'aliasContext' => $this->aliasContext->info()
            ]
        ];
    }
1091950
public function getSystemLoadInfo()
    {
        $cpuMemDto = new CpuMemDto();

        $cpuMemDto = $this->getMemFree($cpuMemDto);
        $cpuMemDto = $this->getCpuIdle($cpuMemDto);

        return $cpuMemDto;
    }
27589
private function getAllInfo()
    {
        $data = [];

        $anime_table = $this->_parser->find('div[class="seasonal-anime js-seasonal-anime"]');
        foreach ($anime_table as $each_anime) {
            $result = [];

            $name_area = $each_anime->find('div[class=title]', 0);
            $producer_area = $each_anime->find('div[class=prodsrc]', 0);
            $info_area = $each_anime->find('.information', 0);

            $result['image'] = $this->getImage($each_anime);
            $result['id'] = $this->getId($name_area);
            $result['title'] = $this->getTitle($name_area);
            $result['producer'] = $this->getProducer($producer_area);
            $result['episode'] = $this->getEpisode($producer_area);
            $result['source'] = $this->getSource($producer_area);
            $result['genre'] = $this->getGenre($each_anime);
            $result['synopsis'] = $this->getSynopsis($each_anime);
            $result['licensor'] = $this->getLicensor($each_anime);
            $result['type'] = $this->getType($info_area);
            $result['airing_start'] = $this->getAiring($info_area);
            $result['member'] = $this->getMember($info_area);
            $result['score'] = $this->getScore($info_area);

            $data[] = $result;
        }

        return $data;
    }
1229891
public function toOptionArray()
    {
        $options = [];
        foreach ($this->getContainers() as $container) {
            $options[] = ['value' => $container['name'], 'label' => __($container['label'])];
        }

        return $options;
    }
409392
public function getRouteInfo()
    {
        if ($this->isSingle()) {
            if (isset($this->containers['route_info']) && ($controller = $this->containers['route_info']->get('controller')) 
                && ($action = $this->containers['route_info']->get('action'))
            ) {
                return ['controller' => $controller, 'action' => $action];
            }
        }
        return ['controller' => 'index', 'action' => 'index'];
    }
1130209
public function get()
    {
        $identities = [];
        $origData   = $this->optimizer->getOrigData();
        $containers = $this->optimizer->getData('search_container') ?? [];

        if (!$this->optimizer->isObjectNew()) {
            $containers = array_unique(
                array_keys(array_merge($this->optimizer->getSearchContainers(), $origData['search_containers'] ?? []))
            );
        }

        if (in_array('quick_search_container', $containers)) {
            $identities = array_merge($identities, $this->getSearchQueryIdentities());
        }

        if (in_array('catalog_view_container', $containers)) {
            $identities = array_merge($identities, $this->getCategoryIdentities());
        }

        return $identities;
    }
682543
public function getServerInfo()
    {
        return sprintf('%s:%s%s%s', $this->host, $this->port, $this->path, $this->core);
    }
1150085
public function getContainerCode()
    {
        if (!$this->hasData('container_code')) {
            $this->setData('container_code', $this->getRequest()->getParam($this->getContainerVarName()));
        }

        return $this->getData('container_code');
    }
15519
public function getDefAsArray()
    {
        return [
            'length'                => $this->definition->getLength(),
            'title'                 => $this->definition->getTitle(),
            'description'           => $this->definition->getDescription(),
            'readOnly'              => $this->definition->getReadOnly(),
            'hidden'                => $this->definition->getHidden(),
            'recordOriginException' => $this->definition->isRecordOriginException(),
            'required'              => $this->definition->getRequired(),
            'searchable'            => $this->definition->getSearchable(),
            'translatable'          => $this->definition->getTranslatable(),
            'collection'            => $this->definition->getCollection(),
            'groups'                => $this->definition->getGroups(),
            'restrictions'          => $this->definition->getRestrictions(),
            'onVariation'           => $this->definition->getOnVariation(),

            'name'                  => $this->getName(),
            'type'                  => $this->getType(),
            'exposedName'           => $this->getExposedName(),
            'doctrineType'          => $this->getTypeDoctrine(),
            'serializerType'        => $this->getTypeSerializer(),
            'xDynamicKey'           => $this->getXDynamicKey(),
            'relType'               => null,
            'isClassType'           => false,
            'constraints'           => array_map(
                [Utils\ConstraintNormalizer::class, 'normalize'],
                $this->definition->getConstraints()
            ),
        ];
    }
1186174
public function getRawData()
    {
        return [
            'ord' => $this->ord,
            'viewname' => $this->viewname,
            'label_en' => $this->labels['en'],
            'label_fr' => $this->labels['fr'],
            'label_de' => $this->labels['de'],
            'label_nl' => $this->labels['nl'],
        ];
    }
769285
public static function getUri() {
        $nginx_port = Docker::getContainerPort(Compose::getContainerName(self::projectName(), 'nginx'), 80);
        if (!$nginx_port) {
            throw new \RuntimeException("nginx container is not running");
        }
        return "http://localhost:$nginx_port";
    }
329937
public static function labels()
    {
        self::bootClass();

        $result = [];

        foreach (static::values() as $value) {
            $result[] = static::getLabel($value);
        }

        return $result;
    }
1103200
protected function getContainer()
    {
        if (!$this->container) {
            $kernel = new \AppKernel('prod', false);
            $kernel->boot();
            $this->container = $kernel->getContainer();
        }
        return $this->container;
    }