Skip to content

cli/compose: accept numeric cpus in stack deploy schema - #7230

Open
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:fix/stack-cpus-number
Open

cli/compose: accept numeric cpus in stack deploy schema#7230
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:fix/stack-cpus-number

Conversation

@locker95

Copy link
Copy Markdown

docker compose config writes deploy.resources.*.cpus as a number. docker stack deploy still uses the v3 schema, which only allowed a string, so piping one into the other dies with cpus must be a string.

Allow number or string in the schema, and stringify numbers on load so the existing NanoCPUs parser still works.

Fixes#5009

compose config emits deploy.resources.cpus as a number. The v3 schema
only allowed strings, so piping one into docker stack deploy failed
with "cpus must be a string".
Signed-off-by: Dean Chen <862469039@qq.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] 26.0.1 does not allow resources.limits.cpu to be a number

1 participant

@locker95