Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

adding device with containers/{id}/update api call has no effect #390

@yuvalbenshalom

Description

@yuvalbenshalom

I am trying to add a volume to a running container with "containers update" API call(http) but I can't find the new volume in the container.
I am adding device to the devices array in the JSON as described in:
https://docs.docker.com/engine/api/v1.32/#operation/ContainerUpdate

example for a call I use:

curl --unix-socket /var/run/docker.sock -H "Content-Type: application/json" \
  http://v1.32/containers/5fe0f2708b65/update \
-d '{"Devices": [{"CgroupPermissions": "rwm","PathInContainer": "/tmp/varmount","PathOnHost": "/tmp/dst"}]}' -v

the call is successful response:

*   Trying /var/run/docker.sock...
* Connected to v1.32 (/Users/yuvalbs/Library/Containers/com.docker.) port 80 (#0)
> POST /containers/5fe0f2708b65/update HTTP/1.1
> Host: v1.32
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 103
> 
* upload completely sent off: 103 out of 103 bytes
< HTTP/1.1 200 OK
< Api-Version: 1.32
< Content-Length: 18
< Content-Type: application/json
< Date: Mon, 04 Dec 2017 09:52:19 GMT
< Docker-Experimental: false
< Ostype: linux
< Server: Docker/17.09.0-ce (linux)
< 
{"Warnings":null}
* Connection #0 to host v1.32 left intact

API version: 1.32
server version: Docker/17.09.0-ce
host os: osx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions