Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Through DOCKER service create SDK API can we add/drop capabilities ? #2802

Closed
loginsmruti opened this issue Apr 6, 2021 · 4 comments
Closed
Assignees

Comments

@loginsmruti
Copy link

How can I be able to do these below capabilities add/drop functionality through Docker SDK API.

'--cap-drop ALL --cap-add NET_ADMIN --cap-add NET_RAW --cap-add MAC_ADMIN
--cap-add KILL --cap-add SYS_PTRACE --cap-add SYS_ADMIN
--cap-add NET_BIND_SERVICE --cap-add DAC_OVERRIDE
--cap-add SETGID --cap-add SETUID --user 1000',

@nuhour
Copy link

nuhour commented Apr 6, 2021

same problem.not support util now,i guess

@feliperuhland
Copy link
Contributor

Hi @vickydgm I´m going to check that later today

@ulyssessouza could you assign this issue to me?

Thanks and have a good day :)

feliperuhland added a commit to feliperuhland/docker-py that referenced this issue Apr 7, 2021
ContainerSpec

Docker Engine v1.41 added `CapAdd` and `CapDrop` as part of the
ContainerSpec, and `docker-py` should do the same.

```
GET /services now returns CapAdd and CapDrop as part of the ContainerSpec.
GET /services/{id} now returns CapAdd and CapDrop as part of the ContainerSpec.
POST /services/create now accepts CapAdd and CapDrop as part of the ContainerSpec.
POST /services/{id}/update now accepts CapAdd and CapDrop as part of the ContainerSpec.
GET /tasks now returns CapAdd and CapDrop as part of the ContainerSpec.
GET /tasks/{id} now returns CapAdd and CapDrop as part of the ContainerSpec.
```

I added capabilities on docstrings, `service.create` init method and
create tests for that.

That change was mention in issue docker#2802.

Signed-off-by: Felipe Ruhland <[email protected]>
@nuhour
Copy link

nuhour commented Apr 9, 2021

@feliperuhland thx for ur commit.

@loginsmruti
Copy link
Author

Thanks @feliperuhland

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants