관리 메뉴

NineTwo meet you

[🍎 Mac OS M1 환경설정] Docker 설치 & 완전 삭제 본문

환경설정

[🍎 Mac OS M1 환경설정] Docker 설치 & 완전 삭제

NineTwo 2024. 2. 13. 23:37
반응형

Docker 설치

아래 주소에 가서 환경에 맞는 Docker를 설치해야 하는데, M1이라면 "Docker Desktop for Mac with Apple silicon" 로 설치해야 한다!! intel 어쩌고로 잘못 설치하면 아래 Docker 완전 삭제하고 재설치할 것! 어차피 잘못 설치하면 열리지도 않는다,,,

https://docs.docker.com/desktop/install/mac-install/

 

Install Docker Desktop on Mac

Install Docker for Mac to get started. This guide covers system requirements, where to download, and instructions on how to install and update.

docs.docker.com


Docker 완전 삭제

sudo rm -rf /Applications/Docker.app
sudo rm -rf ~/.docker
sudo rm -rf /var/lib/docker
sudo rm -rf /var/run/docker.sock
sudo rm -rf /etc/docker

brew uninstall --cask docker
brew uninstall --formula docker-compose docker-machine

ls /usr/local/bin | grep docker

 

마지막 ls 에서 나온것이 있다면 다 지워주기

sudo rm /usr/local/bin/지울이름

M1 Build Error

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

이처럼 Mac M1 환경에서 미리 작성된 docker-compose.yml 파일을 실행시켰을 때 에러가 발생할 수 있다.

 

그렇다면 docker run을 다시 실행하거나,

docker run --platform linux/amd64

docker-compose.yml에 직접 platform: linux/amd64 를 입력하고 해결할 수 있다.

version: "2.4"
services:
  zookeeper:
    image: confluentinc/cp-zookeeper:7.1.1
    hostname: zookeeper
    container_name: zookeeper
    platform: linux/amd64
    ports:
      - "2181:2181"


[참고]
https://stackoverflow.com/questions/69054921/docker-on-mac-m1-gives-the-requested-images-platform-linux-amd64-does-not-m

 

Docker on Mac M1 gives: "The requested image's platform (linux/amd64) does not match the detected host platform"

I want to run a docker container for Ganache on my MacBook M1, but get the following error: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) a...

stackoverflow.com

 

 

반응형

'환경설정' 카테고리의 다른 글

[🍎 Mac OS M1 환경설정] pyenv & poetry 설치  (1) 2024.02.10
Comments