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 install some other images).
So how to do this? Thanks.
If you tried to install the ifconfig utility and failed, it's because ifconfig cannot be individually installed. It is included with the net-tools package. To be able to use the ifconfig command, you have to install the net-tools package first.
It is because ifconfig is not a package in its own. It is installed with net-tools package that has some additional networking tools.
Ifconfig is used to configure the kernel-resident network interfaces. It is used at boot time to set up interfaces as necessary. After that, it is usually only needed when debugging or when system tuning is needed. If no arguments are given, ifconfig displays the status of the currently active interfaces.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With