for-mac icon indicating copy to clipboard operation
for-mac copied to clipboard

Docker abruptly stopped working on MAC

Open iarc13 opened this issue 1 year ago • 9 comments

Description

Machine: MAC, Apple based.

I was using a docker container, but it stopped working & then docker couldn't be started again. This happened for the first time in a while, and yes, I was using docker for quite some time in last 2 days.

I did a reset but that didn't work. When I opened docker after the reset, it tried to start, it says docker is stopped, but it just gets killed.

I killed all processes of docker using the MAC activity monitor. Then re-opened docker, then it worked.

But then again, as I ran the same docker container, it hung up again. Docker service stops suddenly there.

Reproduce

  1. docker run <>
  2. The terminal just freezes. Doesn't even respond to my enters

Expected behavior

it should keep on running.

docker version

Client: Docker Engine - Community
 Version:           24.0.4
 API version:       1.43
 Go version:        go1.20.5
 Git commit:        3713ee1eea
 Built:             Fri Jun 30 17:55:44 2023
 OS/Arch:           darwin/arm64
 Context:           desktop-linux
Cannot connect to the Docker daemon at unix:///Users/iarc13/.docker/run/docker.sock. Is the docker daemon running?

docker info

Client: Docker Engine - Community
 Version:    24.0.4
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.12.1-desktop.4
    Path:     /Users/iarc13/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.24.6-desktop.1
    Path:     /Users/iarc13/.docker/cli-plugins/docker-compose
  debug: Get a shell into any image or container. (Docker Inc.)
    Version:  0.0.24
    Path:     /Users/iarc13/.docker/cli-plugins/docker-debug
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     /Users/iarc13/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.22
    Path:     /Users/iarc13/.docker/cli-plugins/docker-extension
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.4
    Path:     /Users/iarc13/.docker/cli-plugins/docker-feedback
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.0.1
    Path:     /Users/iarc13/.docker/cli-plugins/docker-init
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /Users/iarc13/.docker/cli-plugins/docker-sbom
  scout: Docker Scout (Docker Inc.)
    Version:  v1.5.0
    Path:     /Users/iarc13/.docker/cli-plugins/docker-scout
WARNING: Plugin "/Users/iarc13/.docker/cli-plugins/docker-scan" is not valid: failed to fetch metadata: fork/exec /Users/iarc13/.docker/cli-plugins/docker-scan: no such file or directory

Server:
ERROR: Cannot connect to the Docker daemon at unix:///Users/iarc13/.docker/run/docker.sock. Is the docker daemon running?
errors pretty printing info

Diagnostics ID

86298E70-6156-42D4-92D6-EFF35C81660E/20240415162005

Additional Info

No response

iarc13 avatar Apr 15 '24 16:04 iarc13

I'm having a similar issue. Every time I start docker desktop. It is crashing and causing my MAC to restart.

enoliveira avatar Apr 18 '24 13:04 enoliveira

I am also having a similar issue, except I can't even get to run a container. Diagnostics ID : FA4DE15C-09FB-4A8D-8AAE-7B4332FCA627/20240419093033

justucru avatar Apr 19 '24 09:04 justucru

Is this related to https://github.com/docker/for-mac/issues/7256 ?

petermchale avatar Apr 19 '24 13:04 petermchale

Is this related to https://github.com/docker/for-mac/issues/7256 ?

@petermchale well, not really. I can reinstall docker and it works.

iarc13 avatar Apr 19 '24 15:04 iarc13

Same behavior, constant fails on Mac M1 and Mac M2

mgdelmonte avatar Apr 26 '24 14:04 mgdelmonte

I ran into the same Problem and I fixed it by enabling VT in my pc Here is How you can do it Enable Virtualization in BIOS: Restart your computer and enter BIOS settings (usually by pressing a key like F2, F12, Delete, or Esc during startup, depending on your hardware). Look for an option related to virtualization technology. It might be named something like "Intel VT-x" or "AMD-V". Ensure it is enabled. Save the BIOS settings and restart your computer.

Roshan12here avatar Jun 25 '24 18:06 Roshan12here

@Roshan12here - This is for MAC, apple based.

iarc13 avatar Jun 27 '24 09:06 iarc13

Just an update - I've not noticed this problem since long(2 months) after recent Docker version upgrade.

Can everyone please try to update to the latest version and inform if still facing this ?

iarc13 avatar Jun 27 '24 09:06 iarc13

Same behavior, constant fails on Mac M1 and Mac M2

@mgdelmonte Can you try the latest version?

iarc13 avatar Jun 27 '24 09:06 iarc13