I just got a new MacBook and have been struggling with getting Docker Desktop to function after installing.
I had it on my previous M1 and it worked like a charm, but on my new M4 docker desktop starts up but containers are failing to build and run.
I stripped it down to a simple Dockerfile
FROM maven:3.9-eclipse-temurin-23
RUN mvn -v
And even with this its consistently failing to build with the following error.
% docker build .
[+] Building 0.4s (5/5) FINISHED docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 480B 0.0s
=> [internal] load metadata for docker.io/library/maven:3.9-eclipse-temurin-23 0.2s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> CACHED [1/2] FROM docker.io/library/maven:3.9-eclipse-temurin-23@sha256:323693fcac06d3c25f430032884273307a5c37663e7d54506b5096047b380cdd 0.0s
=> ERROR [2/2] RUN mvn -v 0.2s
------
> [2/2] RUN mvn -v:
0.107 #
0.107 # A fatal error has been detected by the Java Runtime Environment:
0.107 #
0.107 # SIGILL (0x4) at pc=0x0000ffff879401a8, pid=6, tid=21
0.107 #
0.107 # JRE version: (23.0.1+11) (build )
0.107 # Java VM: OpenJDK 64-Bit Server VM (23.0.1+11, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
0.107 # Problematic frame:
0.107 # j java.lang.System.registerNatives()V+0 java.base@23.0.1
0.107 #
0.107 # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
0.107 #
0.107 # An error report file with more information is saved as:
0.107 # //hs_err_pid6.log
0.110 [0.014s][warning][os] Loading hsdis library failed
0.113 #
0.113 # The crash happened outside the Java Virtual Machine in native code.
0.113 # See problematic frame for where to report the bug.
0.113 #
0.114 Aborted
------
Dockerfile:4
--------------------
2 | FROM maven:3.9-eclipse-temurin-23
3 |
4 | >>> RUN mvn -v
5 |
6 |
--------------------
ERROR: failed to solve: process "/bin/sh -c mvn -v" did not complete successfully: exit code: 134
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/rg2w9f1d0ghaiht730odrl53i
I uninstalled and reinstalled being sure to select apple silicon as the download. I even reset the Mac and started from scratch but it’s behaving the same after a full reset. I compared the docker info
between my old laptop and new and it looks identical besides my old one having a swarm started.
Its throwing a similar error when trying to run springboot containers that again work on my old apple silicon laptop.
Any ideas on what the issue could be? Any insight or troubleshooting steps would be greatly appreciated.
Docker Info Output:
docker info
Client:
Version: 27.4.0
Context: desktop-linux
Debug Mode: false
Plugins:
ai: Ask Gordon - Docker Agent (Docker Inc.)
Version: v0.5.1
Path: /Users/xxx/.docker/cli-plugins/docker-ai
buildx: Docker Buildx (Docker Inc.)
Version: v0.19.2-desktop.1
Path: /Users/xxx/.docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.31.0-desktop.2
Path: /Users/xxx/.docker/cli-plugins/docker-compose
debug: Get a shell into any image or container (Docker Inc.)
Version: 0.0.37
Path: /Users/xxx/.docker/cli-plugins/docker-debug
desktop: Docker Desktop commands (Beta) (Docker Inc.)
Version: v0.1.0
Path: /Users/xxx/.docker/cli-plugins/docker-desktop
dev: Docker Dev Environments (Docker Inc.)
Version: v0.1.2
Path: /Users/xxx/.docker/cli-plugins/docker-dev
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.27
Path: /Users/xxx/.docker/cli-plugins/docker-extension
feedback: Provide feedback, right in your terminal! (Docker Inc.)
Version: v1.0.5
Path: /Users/xxx/.docker/cli-plugins/docker-feedback
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v1.4.0
Path: /Users/xxx/.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/xxx/.docker/cli-plugins/docker-sbom
scout: Docker Scout (Docker Inc.)
Version: v1.15.1
Path: /Users/xxx/.docker/cli-plugins/docker-scout
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 1
Server Version: 27.4.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
CDI spec directories:
/etc/cdi
/var/run/cdi
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 472731909fa34bd7bc9c087e4c27943f9835f111
runc version: v1.1.13-0-g58aa920
init version: de40ad0
Security Options:
seccomp
Profile: unconfined
cgroupns
Kernel Version: 6.10.14-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: aarch64
CPUs: 14
Total Memory: 15.6GiB
Name: docker-desktop
ID: fa25b281-9420-485c-a274-33a2e43dbd7f
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Labels:
com.docker.desktop.address=unix:///Users/xxx/Library/Containers/com.docker.docker/Data/docker-cli.sock
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5555
127.0.0.0/8
Live Restore Enabled: false