Home > Software design >  docker build nginx(ingress-nginx) images slowly, how to speed up this
docker build nginx(ingress-nginx) images slowly, how to speed up this

Time:10-28

Sometimes we face some nginx vulnerabilities, so we need to fix the nginx vulnerabilities inside ingress-nginx, but the docker build -t image is too slow. The reason is that the dockerfile internal will make compile and make install process. How to add some parameters can make the docker build process faster?

Although the docker build process prompts make to add the -j parameter to increase threads to speed up the process, there is no make related parameter inside the dockerfile. It is not a good idea to modify the dockerfile directly.

enter image description here

docker version: docker-ce.20.10

Actual testing of images made by buildkit
may actually do little to improve the efficiency of making images if they involve a lot of compilation processes internally.
Maybe based on the official alpine base image,
consider add the -j nproc parameter in dockerfile to increase the threads, would be a good direction.

  • Related