PHP Docker image crashes on M1 Mac, works perfectly on Intel Mac

Hello Docker Community!

I’m coming up empty on diagnosing an issue driving me to drink. I was hopeful of getting some help debugging the problem.

I have a docker container built from the official PHP images here Docker

With the advent of new Apple Silicon Macs, I figured it’d be a cinch to use buildx to compile versions of this image - but the image isn’t behaving as expected. Seems to compile ok, but on the M1 Macs, it just ‘jams’.

I’m using docker compose to raise the image

version: "2"

    image: circlical/php74app-behat-multi:latest
      - ./docker/php.ini:/usr/local/etc/php/php.ini:delegated
      - ./docker/php-fpm.conf:/usr/local/etc/php-fpm.conf:delegated
      - ./docker/php-log/:/var/log/php/:delegated
      - ./build/behat/coverage/:/behat-coverage/:delegated
      - nfsmount:/code:cached
      - lemonade-testnet

    driver_opts: 1450
    driver: bridge

    driver: local
      type: nfs
      o: addr=host.docker.internal,rw,nolock,hard,nointr,nfsvers=3
      device: ":${PWD}"

The filesystem is using nfsd, and I can confirm that it seems to mount as expected (can access all files from within the PHP container).

On my Intel Mac, I docker compose up and interact with it as one normally would. I can docker container exec -it $(docker-compose ps -q php) /bin/bash to get into the container, and execute code from the command line with no issue.

On the Apple Silicon Mac, however, executing this same described process just hangs (dead) - even CTRL+C won’t work. I’m not getting any backtraces with gdb, and if I strace the process, the output always freezes at the same spot and never reaches an exit code (just hung, dead in the middle of a read operation).

I’ve tried manipulating the amount of memory, reducing to 1 CPU, and tried every permutation of Virtualization Framework and gRPC/VirtioFS, and it’s always the same result.

Can you recommend some help toward debugging the problem? Anyone seen this?


Affected machine is an Apple M1, 16 GB on Mac Ventura 13.2