Throwing a BYOD Party

Thinking of throwing your own BYOD party? Let’s talk about how to be the talk of the town, and not the laughing stock of the social season. This trend is all the rage this season due to the…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




How to limit the resources allocated to a docker container?

Scalability is the most important factor while deploying an application. That is the reason why IT industries have been moving towards containerization.

Docker is a platform designed to help developers build, share, and run modern applications and helps to containerize your application.”

Sometimes we are having more than one docker container running on the same server. In this case, we should also handle the resource utilization by the containers. Sometimes it may happen that only a single docker container occupies the whole memory or the CPU power of the server and because of this, other containers are not getting the resources to run the applications on it.

This case can be handled in ways: while using docker-compose and while not using docker-compose

Here, we are specifying the maximum limit on memory (RAM) as 1 GB and the number of CPUs as 2.

2. If you are using docker-compose, add the resources with limits in it as follows:

This is how you can limit the resources to a docker container.

If this post was helpful, please do follow and click the clap 👏 button below to show your support.

Thank you for reading!

Add a comment

Related posts:

101 Things You Must Know Today About Our Future!

Did you know that artificial intelligence is changing our world faster than we can imagine? It will impact every area of our lives. And this is happening whether we like it or not. Artificial…

3. Online Instrument Learning Impediments

This post catalogues some of the many -and often dramatic- deficits in online music education. These have been grouped according to their broad area of application, for example: In doing so, we set…

Improving Fan Experience in the Sports and Entertainment Industry

The world of sports currently finds itself in a peculiar situation. Digital transformation is helping sports franchises give their fans newer and better ways to interact with their teams, which is…