How to install “ifconfig” command in my ubuntu docker image?

前端 未结 9 1261
后悔当初
后悔当初 2021-01-30 02:50

I\'ve just installed ubuntu docker image, when I execute \"ifconfig\" it says there\'s no such command, I tried apt-get install by there\'s no package named \"ifconfig\"(I can i

9条回答
  •  长情又很酷
    2021-01-30 03:18

    On a fresh ubuntu docker image, run

    apt-get update
    apt-get install net-tools
    

    These can be executed by logging into the docker container or add this to your dockerfile to build an image with the same.

提交回复
热议问题