본문 바로가기
Back-end/Docker

cAdvisor M1에 설치하기

by whatamigonnabe 2023. 4. 21.

[GitHub - google/cadvisor: Analyzes resource usage and performance characteristics of running containers.

Analyzes resource usage and performance characteristics of running containers. - GitHub - google/cadvisor: Analyzes resource usage and performance characteristics of running containers.

github.com](https://github.com/google/cadvisor)

위 공식 깃헙에서 설명하는대로 cAdvisor를 설치하려고 하면 우선 아래의 에러를 만납니다.

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

해결 방법을 찾아보다 아래 선생님이 알려주신 방법으로 하면 해결됩니다.

[Does not work with Macbook M1 Docker for mac. · Issue #3187 · google/cadvisor

Macbook M1 Docker engine Failed to create a manager: could not detect clock speed from output: "processor\t: 0\nBogoMIPS\t: 48.00\nFeatures\t: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fph...

github.com](https://github.com/google/cadvisor/issues/3187#issuecomment-1511641714)

버전을 v0.47.1로 하는 것 대신에 v0.47.1로 run하면 됩니다.

그리고 cAdvisor에서 containers를 클릭하면, 아래의 에러를 만납니다.

Failed to create a manager: could not detect clock speed from output: "processor\t: 0\nBogoMIPS\t: 48.00\nFeatures\t: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint\nCPU implementer\t: 0x00\nCPU architecture: 8\nCPU variant\t: 0x0\nCPU part\t: 0x000\nCPU revision\t: 0\n\nprocessor\t: 1\nBogoMIPS\t: 48.00\nFeatures\t: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint\nCPU implementer\t: 0x00\nCPU architecture: 8\nCPU variant\t: 0x0\nCPU part\t: 0x000\nCPU revision\t: 0\n\nprocessor\t: 2\nBogoMIPS\t: 48.00\nFeatures\t: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint\nCPU implementer\t: 0x00\nCPU architecture: 8\nCPU variant\t: 0x0\nCPU part\t: 0x000\nCPU revision\t: 0\n\nprocessor\t: 3\nBogoMIPS\t: 48.00\nFeatures\t: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint\nCPU implementer\t: 0x00\nCPU architecture: 8\nCPU variant\t: 0x0\nCPU part\t: 0x000\nCPU revision\t: 0\n\nprocessor\t: 4\nBogoMIPS\t: 48.00\nFeatures\t: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint\nCPU implementer\t: 0x00\nCPU architecture: 8\nCPU variant\t: 0x0\nCPU part\t: 0x000\nCPU revision\t: 0\n\nprocessor\t: 5\nBogoMIPS\t: 48.00\nFeatures\t: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint\nCPU implementer\t: 0x00\nCPU architecture: 8\nCPU variant\t: 0x0\nCPU part\t: 0x000\nCPU revision\t: 0\n\n"

이것은 아래 선생님의 설명을 따라 했더니 해결 됐습니다.

[Cadvisor not showing Docker containers with Docker for Mac · Issue #1565 · google/cadvisor

Dear CAdvisor team, I am running Docker for Mac and have two containers running on my machine as shown below: $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 38d9770aafd4 google/c...

github.com](https://github.com/google/cadvisor/issues/1565#issuecomment-718812180)

--volume=/var/run:/var/run:ro \

위의 마운팅 대신에

--volume=/var/run/docker.sock:/var/run/docker.sock:rw \

위의 코드를 넣어주면 됩니다. 마운팅 관련 이슈라고 합니다..!

아직 docker가 M1에 최적화 되어 있지 않은 것을 곳곳에서 느껴지네요.

'Back-end > Docker' 카테고리의 다른 글

Dockerfile 공식문서 정리 2  (1) 2023.04.19
Dockerfile 공식문서 정리 - 1  (0) 2023.04.17