Anyone who’s using docker on Arm devices knows the pain of finding a container matching your processor architecture. Most official repo’s dont have that problem, but some smaller repo’s suffer from tag-overload which makes it harder to find the suitable container.
The same thing happened with Swoole. When i was playing around on a arm device and was in need of a swoole-instance – i headed over to dockerhub and checked the official swoole docker-repo and there is was : TAG OVERLOAD!

The project im working on should work on arm, arm64 and amd64 – and it would be great if -with every update- i dont have to manually search for the correct container. the Swoole repo does have a ‘latest’ tag – but that one is architecture specific – which sux.
For this specific problem is only one solution – i had to build my own repo. For the same reason im already maintaining a true multiarchitecture repository for FusionAuth.
So, if you intend to build a ‘portable’ swoole app which can be deployed via docker on several architectures – you need a multiarch docker repository.
So, annoyed by the Architecture via seperate tags on the official Swoole, i decided to make a true multiarchitecture swoole repo.
https://hub.docker.com/repository/docker/jerryhopper/swoole
Supports : Armv7, Arm64, Amd64
What’s different?
Nothing really – all functionality from the official swoole containers is included.

What’s changed?
Good question! Checkout line 30 of src/Dockerfile.php in the official Swoole repo. i changed :
self::ARCH_ARM64V8 => ‘arm64v8/php’,
into this:
self::ARCH_ARM64V8 => ‘php’,
This change will result in docker autodetecting the right container for the other architectures. This is only possible because the PHP docker repository does support true multiarchitecture containers on dockerhub.
Obviously – after this i build the containers using buildx – and the result is this multiarchitecture swoole repositorry based off my modified git repo
NOTE: The multiarchitecture Swoole repo supports Armhf, which is not provided in the official phpswoole repo. Yes, you can run swoole in docker on a older raspberry pi.
At the time of writing this article, im still building and pushing all major versions of swoole/php – including the developer images. Therefore the ‘latest’ tag is probably not available yet, give it some time.
Have fun!