Score:1

Is it possible to fake the amount of ram or CPU cores in a Docker container?

hu flag

I want to fake the amount of RAM/CPU cores I have in my Ubuntu container. I'm running Chrome on the container and I'm trying to access a website, but the website needs a certain system requirement to run and it runs checks. Unfortunately, I can't just patch the variable it uses because it has extra checks to detect that.

So, is there any way I can put a fake RAM count on my container? Chrome probably uses some sort of C++ lib to fetch system information. Is there any way I can patch this library?

Artur Meinild avatar
vn flag
Since Docker uses the system's native kernel, I would think this is a difficult task, and probably not a scenario that is officially supported in any way...
ru flag
As Docker reflects the system kernel's data, this would be very hard if not impossible to do, and would very likely not function properly for the Docker environment and very likely would break your system as you'd have to patch your kernel in an unsafe way to fake the data coming out of your hardware drivers. And could very likely damage your installation of Ubuntu
in flag
This would result in some disastrous system failures when work is scheduled to a CPU core that does not exist or data is written to a memory address that does not exist …
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.