Docker Community Forums

Share and learn in the Docker community.

REST API Container Update

Hey all :slight_smile:

Been playing around with the Docker REST API (https://docs.docker.com/engine/api/v1.40)

More specifically with updating containers according to this endpoint (https://docs.docker.com/engine/api/v1.40/#operation/ContainerUpdate)
Ima unable to modify the option OomKillDisable, that should be possible according to the endpoint provided above.

Im trying to send the following payload to the endpoint /containers/CONTAINER_HAST/update:

{
    "OomKillDisable": true,
    "CpuShares": 1101,
    "Memory": 3221225472,
    "MemoryReservation": 10485760,
    "MemorySwap": 2147483648,
    "NanoCPUs": 1000000000
}

I get a status 200 with no warnings, but the option is not set, I’m able to set this option while creating the container thru this endpoint, but I’m never able to change it by updating the container, as it should be possible according to the documentation, I’m able to change other properties such as Memory tho.