I am using several Windows 10 hosts in swarm mode. Unfortunatelly docker for Windows 10 only supports hyper-v isolation for running containers. Each hyper-v container has by default only 1GB memory and 2 vCPUs. This limit contradicts documentation “By default, a container has no resource constraints”. I am running containers that need more than default hyper-v limits. For memory I was able to work around this by setting limits in compose file v3.
For example for settings 8GB memory:
services:
test-service:
image: my-test-image
deploy:
resources:
limits:
memory: 8g
However I did not find a way how to change number of vCPUs. How can it be changed?