[英]docker build --memory on windows 10
I am trying to build a container on my Windows 10 machine to run unit tests. 我正在尝试在Windows 10计算机上构建一个容器以运行单元测试。 I use
docker build --memory 4g --tag test .
我使用
docker build --memory 4g --tag test .
. 。 I am using image -
microsoft/dotnet:2.2-sdk-alpine
. 我正在使用图像
microsoft/dotnet:2.2-sdk-alpine
。 My tests run fine on my Windows 10 Client using dotnet test Tests
. 我的测试使用
dotnet test Tests
在Windows 10 Client上运行良好。 When running in the container, they run fine till memory execeds 1GB, then they fail with - out of memory. 在容器中运行时,它们可以正常运行,直到执行了1GB的内存为止,然后它们因-内存不足而失败。
How do I increase the memory for my container during build on Windows 10 client? 在Windows 10客户端上进行构建期间,如何增加容器的内存?
Docker works fine for me locally. Docker在本地对我有效。 I run Linux containers and Windows containers locally.
我在本地运行Linux容器和Windows容器。 The windows containers are just hosting simple APIs so they likely never excede 1GB of RAM.
Windows容器仅托管简单的API,因此它们很可能从未占用1GB的RAM。 I don't run Linux & Windows simultaneously.
我不会同时运行Linux和Windows。
我将在Hyper-V中运行的MobyLinuxVM的RAM从2GB增加到8GB,同时将每个容器的可用RAM数量从2GB增加到6GB,这解决了我的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.