You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per current definition the deploy section of the v3 compose file shall only have a effect when using swarm, expect for resources:
The following sub-options only takes effect when deploying to a swarm with docker stack deploy, and is ignored by docker-compose up and docker-compose run, except for resources.
Which works for setting deploy: resources: limits: memory: 100M, even when not in swarm mode nor using the --compatibility flag. The inspect command shows correct "Memory": 104857600.
BUT which does not work is setting deploy: resources: reservations: memory: 100M - it has no effect. Looked up via docker inspect containerA shows:
[
{
"HostConfig": {
"MemoryReservation": 0,
}
]
What does work is setting mem_reservation on the service level but the official Compose Specification says about:
mem_reservation DEPRECATED: use deploy.reservations.memory.
FireEmerald
changed the title
[BUG] Resources reservations does not work in v3
[BUG] Resources reservations has no effect in v3 for non swarm
Dec 6, 2022
Description
This issue belongs to the NON SWARM mode.
As per current definition the
deploy
section of the v3 compose file shall only have a effect when using swarm, expect for resources:Which works for setting
deploy: resources: limits: memory: 100M
, even when not in swarm mode nor using the--compatibility
flag. The inspect command shows correct"Memory": 104857600
.BUT which does not work is setting
deploy: resources: reservations: memory: 100M
- it has no effect. Looked up viadocker inspect containerA
shows:What does work is setting
mem_reservation
on the service level but the official Compose Specification says about:Steps To Reproduce
See description to reproduce.
Compose Version
Docker Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: