April 2017
Beginner
404 pages
9h 30m
English
We can also limit the RAM memory than can be allocated to Windows Container, a few containers which are memory intensive might require more amounts of RAM memory, as for example, the SQL Server. By default, every container is allocated all of the RAM memory available on the host. The following command restricts the memory allocation to 1 GB for the Windows Container:
docker run -it --memory=1024 microsoft/windowsservercore cmd
A few more options available for allocating memory to containers are shown in the following table:
| Option | Data type | Description |
| --memory, -m | String | Memory limit |
| --memory-reservation | String | Memory soft limit |
| --memory-swap | String | Swap limit equal to memory plus swap: -1 to enable unlimited ... |
Read now
Unlock full access