Docker Hub Automated Build too slow while installing Poetry itself compared to local build

Actually, compared to local machine (MacBook M1 Pro), every layer of build is slow, as DockerHub autobuild takes 13min while local only takes 39s.

But, I found that

  • Installing Poetry while building image takes 209.5s
  • Installing Python libraries using Poetry takes 170.09s

This is insane as those layers only took 3s and 9s on my local machine. Do you guys have any workaround? I asked about this on “Contact Us”, but couldn’t get a reply after 2 weeks.

Additional notes

  • I’m currently using multiarch/qemu-user-static as autobuild does not support ARM64 build natively.
  • I ran local build with --no-cache. Yeah, cached autobuild is slower than non-cached local build.
  • I’m currently using pro plan (which I regrets).

Just to clarify it, do you compare the speed of building an arm64 image on MacBook M1 to building an arm64 image using emulation on Docker Hub?

If I understand it correctly then it could be the reason of the speed difference. I can’t explain why, and unfotunately I can’t tell you how you can speed it up, but emulated containers are often slower. It depends on the application. Sometimes it doesn’t hurt at all, and sometimes it doesn’t work at all.