Docker stops responding on MacOS, error on Arch Linux while building image

Docker stops responding on MacOS, error on Arch Linux while building image.

OS: MacOS Sonoma 14.4.1 and Arch Linux
App version:
 Cloud integration: v1.0.35+desktop.11
 Version:           25.0.3
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        4debf41
 Built:             Tue Feb  6 21:13:26 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Steps to reproduce:

git clone https://github.com/demensdeum/Masonry-AR-Docker.git
cd Masonry-AR-Docker
docker buildx build .

wait some time
stuck at “CXX Magick++/lib/libMagick___7_Q16HDRI_la-TypeMetric.lo”
docker ps not responding
docker images not responding


If I remove ImageMagick build from Dockerfile and move it to terminal, then ImageMagick build ends with error:
ERRO[0033] error waiting for container: unexpected EOF
and after that docker ps, docker images did not respond

I don’t understand. How is Arch Linux in the title related to the issue?

On Arch Linux I got error in terminal instantly after calling docker ps or docker images after stuck, on MacOS it’s just silent

For 26.0.0 version on MacOS I got:
ERROR: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF

while “docker-buildx build .”
I think there is bug in builder, similar to “failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF · Issue #2064 · docker/buildx · GitHub

You mean Docker CE v25.0.0 in Docker Desktop for Mac? Because as far as I know, the latest version on macOS is Docker Desktop 4.28 which has Docker CE 25.0.3 in it. but docker ps not responding doesn’t seem to be related.

Regarding the error on macOS, “waiting for container: unexpecteed EOF” could be that the API server can’t respond properly because the build requires too much resources. That would explain why docker ps can’t respond either. Did you try to watch the bottom of the Docker Desktop window while the build runs to see the used resources? You could also optimize your Dockerfile as this doing an upgrade like this is highly discouraged

It is not a vitual machine. Install what you need and don’t touch dependencies you don’t unless you know about a serious security risk. Otherwise you can actually introduce new security holes or in some cases you can upgrade almost every package which just makes your image much bigger. I could mention more problems, but this topic is not about making a perfect Dockerfile so I won’t do it.

I tried 26.0.0 for MacOS version from brew.
But first I reproduced by Docker Desktop.

Problem disappears after replacing lines with ImageMagick 7 compilation to compilation from another repository:

I will check resources + play with Dockerfile, and report if I found anything more, aside from imei workaround.

How does that work? Can you share the command? macOS doesn’T support containers, so you need the Desktop. Did you install the Docker CE 26.0.0 clint only?

Yes here commands:

brew install docker
brew install docker-buildx
brew install colima
colima start

After that

docker --version   
Docker version 26.0.0, build 2ae903e86c

That is the client. It can be useful when you don’t want to run Docker on your machine just connect to a remote machine, but the client comes with Docker Desktop. If you want to use brew, brew install docker-desktop should work probably. Since this is not the officially ecommended way, I always forget :slight_smile: A different client could cause hanging docker ps, but then it would never work not just after trying to build an image, so the problem will be on the Docker Daemon side in the virtual machine. Just to avoid other problems caused by the client, I recommend deleting the “docker” brew package.

This does not work without colima, and colima is “container runtimes on macOS”, I can assume that they run linux in vm, and then docker on the top of this linux-vm.
I got original problem without colima, or other client, just vanilla Docker Desktop.

You mean the docker command from brew? Yes colima runs a virtual machine, but the client is just a client. It could work with Docker Desktop or any daemon since the contexts are configured in $HOME/.docker. I ran brew install docker and since I already had the client from Docker Desktop, brew didn’t replace my client. It was only kept in /opt/homebrew. I don’t know what Docker Desktp would do if it is installed after the other client.

1 Like

Can’t reproduce problem on Windows 11 with Docker Desktop:
docker --version
Docker version 25.0.3, build 4debf41

Reproducable only on Arch Linux (x86-64) and MacOS Sonoma 14.4.1 with M2 CPU

I think this is race condition bug in buildx (different thread libs?), added issue into their bug tracker