Is Elixir able to see all cpu cores within docker?

Hello everyone I have two questions about running elixir inside docker. First of all, I ran iex on my host machine and it says that there is 8 cores available

but when I run docker run -it elixir iex

it says only 4 is available is that right? is it possible to use all 8 cores inside docker? The last question is about running :observer.start inside the container I get

The number of CPUs exposed inside a Docker container is configurable:

As for starting observer, the error is because the container doesn’t have the necessary libraries (wxWidgets and dependencies). Even if you get those installed, seeing the window will require some additional plumbing.

An alternative that might be easier would be to connect a remote IEx session from your local machine to the BEAM inside the container; this previous discussion covers some of the details and has a good writeup at the very end of what you’ll need to do.


Thank you! Helped a lot