Docker on ARM extremely slow

Viewed 1227

On my development machine, I can build my image in about 30 seconds. This is the Dockerfile I'm building from.

However, now I need to deploy my application on a Raspberry Pi, and now I have to target ARM. The project linked above also contains an ARM Dockerfile that I'm using. However, this is extremely slow, no matter how I build it. It takes at least 20 minutes, regardless of how I've approached the build. This is what I've tried:

  • Using qemu to build on my developer machine. Docker version 18.09.1, build 4c52b90, qemu-arm version 2.11.1
  • Building on a Rasbperry Pi 3 Model B, Docker version 18.09.0, build 4d60db4.
  • Enabling remote access to the daemon on Raspberry and using dockers -H flag to target that daemon from my development machine.

Fetching dependencies using maven is excruciatingly slow and takes up the bulk of the time spent creating the image, even when the dependencies are in our mirrored internal repository.

Is there any way to speed the process up? Can the Dockerfiles be improved? Am I at fault, or is it like this building for ARM, if so, why?

0 Answers
Related