首页 > 解决方案 > Docker ram 内存限制

问题描述

docker有内存限制吗?即使我们在参数 -memory 中指定?因为我的 docker,即使我提供 55GB RAM,也高达 18GB(或多或少),所以我使用 windows 容器。我想知道 --memory-swap 标志是否会有所帮助,或者 demo.json 中是否有任何设置?我需要使用 40GB

return await client.Containers.CreateContainerAsync(
                new CreateContainerParameters
                {
                    Env = environmentVariables,
                    Name = containerName,
                    Image = imageName,
                    ExposedPorts = new Dictionary<string, EmptyStruct>
                    {
                        {
                            "80", default(EmptyStruct)
                        }
                    },
                    HostConfig = new HostConfig
                    {
                        Memory = containerMemory,
                        Isolation = "process",

标签: c#docker

解决方案


推荐阅读