docker - RTNETLINK answers: Operation not permitted - Docker Swarm
问题描述
I'm running a docker swarm using docker compose
and I'm trying to run tc in my script however it returns
RTNETLINK answers: Operation not permitted
I double checked it and it seems I have to add some flags to my docker compose file.
I tried already adding
privileged: true
Which made no difference
and
securityContext:
privileged: true
capabilities:
add: ["NET_ADMIN","NET_RAW"]
Which errored on starting up the swarm, I assume this is for kubernetes only.
Same for this option:
cap_add:
- NET_ADMIN
How can I fix this issue?
解决方案
cap_add:
- NET_ADMIN
已添加到最新的 docker 版本中,并且可以与版本:20.10.5 一起正常工作。
至少在 Ubuntu 20 上,我必须使用 docker doc 中提供的安装脚本手动更新到 stable 分支
推荐阅读
- r - R:删除(rm)一个变量,其中该变量的名称是存储在另一个变量中的字符串
- node.js - 在 godaddy 共享主机上永远运行 node/express 应用程序
- r - 如何从使用 R 定义 3 个级别的现有列形成 1 列?
- python - PyInstaller 创建的独立可执行文件无法导入 Numpy
- python - 如何从字典列表中删除 k,v 条目
- xcode - Xcode 在源代码管理中显示多个项目
- javascript - Javascript - 当页面中没有元素具有焦点时,keydown 上的焦点元素
- javascript - 难以将正则表达式与过滤方法匹配
- jquery - 将选定选项从多个选择标签推送到数组中
- python - 如何使用 Python 将每个月的常数乘以原始时间序列