트러블슈팅

도커 악성 코드가 차단됨: com.docker.vmnetd에 악성코드가 포함되어 있어서 열리지 않았습니다.

컴공오지마라 2025. 2. 3. 23:00

1. 문제상황

 

 

새해가 된 후 오랜만에 도커를 실행했는데, 이런 오류가 날 반겨줬다.

 

찾아보니, 서명을 담당하는 인증서가 만료되어 발생한 오류라고 한다.

 

사실 원인은 크게 궁금하지 않아서 대충 찾아봤기 때문에 정확하지 않을 수도 있다 . . .

 

얼른 다시 개발하러 가야하기 때문에 바로 해결방안을 알아보도록 하자!

 

아래 링크를 참고해 문제를 해결할 수 있었다 👍

 

https://github.com/docker/for-mac/issues/7527

 

Malware detection prevents Docker Desktop to start · Issue #7527 · docker/for-mac

Description Some versions of Docker Desktop might fail to start or function with the following error message: Malware Blocked. “com.docker.vmnetd” was not opened because it contains malware. This a...

github.com

 

2. 해결방안

도커 데스크탑을 삭제하고 4.37.2 버전으로 다시 설치하면 된다. 그런데, 애플리케이션에 도커앱을 삭제한 후에 추가로 해줄것이 있다. 바로 디스크에 남아있는 몇몇 파일들까지 지워주는것!

 

4.37.2 버전은 아래 링크에서 설치할 수 있다.

https://docs.docker.com/desktop/release-notes/#4372

 

Release notes

Find the Docker Desktop release notes for Mac, Linux, and Windows.

docs.docker.com

 

2.1 웹사이트에서 dmg 파일로 설치한 경우

sudo rm -rf /Applications/Docker.app

# Docker 설정 및 캐시 파일 삭제
rm -rf ~/Library/Application\ Support/Docker
rm -rf ~/Library/Caches/com.docker.docker
rm -rf ~/Library/Preferences/com.docker.docker.plist
rm -rf ~/Library/Logs/Docker\ Desktop
rm -rf ~/Library/Containers/com.docker.docker
rm -rf ~/Library/Containers/com.docker.helper

# Docker VM 및 관련 파일 제거
rm -rf ~/.docker
sudo rm -rf /Library/PrivilegedHelperTools/com.docker.vmnetd
sudo rm -rf /Library/LaunchDaemons/com.docker.vmnetd.plist
sudo rm -rf /Library/LaunchDaemons/com.docker.socket.plist
  • 위 명령어를 모두 실행해 관련된 파일을 삭제하도록 하자.

2.2 Homebrew로 설치한 경우

brew uninstall --cask docker
brew cleanup
  • 위 명령어를 실행하자.

2.3 도커 완전 삭제 확인

which docker
ls -la /Applications | grep Docker
ls -la ~/Library/Application\ Support | grep Docker
  • 아래 명령어를 실행했을 때 아무것도 출력되지 않으면 도커와 관련된 모든 파일이 삭제된 것이다!

 

이후에 도커 데스크탑을 재설치하면 정상적으로 실행된다!