• (OK) can't modify the kernel IP routing table in the container



    https://groups.google.com/forum/#!topic/docker-user/gFHoaKpr7no

    Hi,
    I tried to modify the the kernel IP routing table in the container, like set default gateway or add routing record, they both are not permitted like below:

    [root@1a066a5779fe ~]# route add default gw 10.175.177.176
    SIOCADDRT: Operation not permitted
    [root@1a066a5779fe ~]# ip route add 10.175.177.176/29 dev eth1
    RTNETLINK answers: Operation not permitted
    [root@1a066a5779fe ~]# route add -net 10.175.177.176 netmask 255.255.255.248 gw 10.175.177.169 dev eth1
    SIOCADDRT: Operation not permitted

    anyone knows why? who has solution or work around here?

    best regards.
    --------------------------------------------------------------------------------------------------------------------------------------------

    Panagiotis Moustafellos

    kernel network capabilities are not enabled by default.

    You are going to need to run your container with --privileged

    --------------------------------------------------------------------------------------------------------------------------------------------

    Solomon Hykes

    Note that, in addition to the (heavy-handed) --privileged, you can also enable individual capabilities with --cap-add.

    --------------------------------------------------------------------------------------------------------------------------------------------

    hi Panagiostis,


    that's true. I just tried to start container with '--priviledged=true', it's working now. thanks very much for your help.

    best regards.

    --------------------------------------------------------------------------------------------------------------------------------------------

    hi Solomon,


    thanks for your advise, i will take chance to try it.

    best regards.

  • 相关阅读:
    PP篇10 修改工单组件行
    取未清PO逻辑
    PP篇7 生产替代料齐套后处理
    PP篇9 更改计划订单
    DEBUG技巧里的问题1 双击某个变量不能显示
    HoloLens开发手记
    开始开发HoloLens应用吧 Start Developing HoloLens Apps Today
    HoloLens开发手记
    HoloLens开发手记
    HoloLens开发手记
  • 原文地址:https://www.cnblogs.com/ztguang/p/12646304.html
Copyright © 2020-2023  润新知