The Wayback Machine - https://web.archive.org/web/20251014181620/https://github.com/docker/compose/issues/9501
Skip to content

deploy.resources.limits.cpus not match nanocpus #9501

@j0rGeT

Description

@j0rGeT

Description

deploy.resources.limits.cpus set docker is nanocpus not match cpus

Steps to reproduce the issue:

version: "2.4"
services:
  platform:
    image: harbor.huayun.org/dev/xxxxx
    privileged: true
    pid: "host"
    deploy:
        resources:
          limits:
            cpus: '100000000' // we need to x1000000 ?
            memory: 512M

Describe the results you received:

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker compose version:

docker-compose v2.2.2

Output of docker info:

if we set cpus=1 in docker-compose config file, docker inspect xxxx nanocpus = 1 or  not  10000000 ?

compare 

docker-compose 1.24.1 version,i find set cpus=1,docker inspect xxxx nanocpus is 100000000

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions