středa 19. července 2023

Flutter is not building application

I migrated my flutter project to a new computer and after a while I realized that it is not building because of a strange CMake error.

How I fixed it?

flutter clean

then I deleted windows directory under my project

flutter create .

flutter run


And that is all!

pondělí 17. července 2023

Docker - "unable to allocate file descriptor table - out of memory"

I've tried to run some docker images from vulnhub - they have images with known CVEs like log4j etc.

It is easy, just run docker-compose up and you have it. Unfortunately I recieved a lot of errors and the reason was: "unable to allocate file descriptor table - out of memory". It is caused by changed ulimits in system.conf.

How to fix it?

You have to limit docker and it is necessary just to add following lines to docker compose file:

ulimits:
  nproc: 65535
  nofile:
    soft: 26677
    hard: 46677

Then everything will work again.
And if you'd like to run it directly from the commandline just run:

docker run --ulimit nproc=65535 --ulimit nofile=26677:46677 -d <your_image>