How can we add capabilities to a running docker container?

前端 未结 3 992
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-31 13:27

Is it possible to add a capability (for ex: NET_ADMIN) after the container has actually started?

I started a container few days ago and a service provided by it is b

3条回答
  •  臣服心动
    2020-12-31 13:42

    you can run commands inside a running container using docker exec -it {container_id} /bin/bash. It will create a bash for you that you can run commands with. but generally it's not a good practice to have modifications on image states since it removes the portability of images.

提交回复
热议问题