[Docker/도커] - com.docker.socket was not opened because it contains malware 에러 해결
회사에서 docker를 통해 프로그램을 배포하고 있는데 어제까지만 해도 잘 열리던 Docker Desktop이 갑자기 안 열리는 오류가 발생했다.
정확히 말하면 “com.docker.socket” 과 관련하여 mac os에서 악성 코드로 간주하고 열리지 않게 막는 상황이였다.
아래 사진과 같은 창만 계속 뜨고 열리지는 않아서 컴퓨터 문제인가 싶어서 지웠다 다시 깔아보고 전원도 다시 켜봤지만 소용 없었다.
구글에서 com.docker.socket와 관련해서 검색해보니 어제~이틀 전 부터 사람들이 같은 오류를 겪고 있었다.
https://forums.docker.com/t/malware-blocked-com-docker-vmnetd-was-not-opened-because-it-contains-malware/145930/1 => 아래 사진 커뮤니티 링크
이걸 같은 백엔드 팀원에게 공유했고 시간이 좀 지나니 해결방안이 있는 링크를 보내주었다.
아래 링크를 들어가게 되면 다음과 같은 코드가 나오는데 저걸 그대로 따라치니까 오류가 해결 되었다.
https://github.com/docker/for-mac/issues/7520
[Workaround in description] Mac is detecting Docker as a malware and keeping it from starting · Issue #7520 · docker/for-mac
Description Whenever Docker is started, this error is shown: Malware Blocked. “com.docker.socket” was not opened because it contains malware. this action did not harm your Mac. Reproduce Start Dock...
github.com
#!/bin/bash
# Stop the docker services
echo "Stopping Docker..."
sudo pkill '[dD]ocker'
# Stop the vmnetd service
echo "Stopping com.docker.vmnetd service..."
sudo launchctl bootout system /Library/LaunchDaemons/com.docker.vmnetd.plist
# Stop the socket service
echo "Stopping com.docker.socket service..."
sudo launchctl bootout system /Library/LaunchDaemons/com.docker.socket.plist
# Remove vmnetd binary
echo "Removing com.docker.vmnetd binary..."
sudo rm -f /Library/PrivilegedHelperTools/com.docker.vmnetd
# Remove socket binary
echo "Removing com.docker.socket binary..."
sudo rm -f /Library/PrivilegedHelperTools/com.docker.socket
# Install new binaries
echo "Install new binaries..."
sudo cp /Applications/Docker.app/Contents/Library/LaunchServices/com.docker.vmnetd /Library/PrivilegedHelperTools/
sudo cp /Applications/Docker.app/Contents/MacOS/com.docker.socket /Library/PrivilegedHelperTools/