Docker – Why isn’t ifconfig available in Ubuntu Docker container

docker

With the base ubuntu:12.04, ifconfig is not available in the container, though the ip command is available, why is this? and, how to get ifconfig in the container?

Best Answer

You can install ifconfig with apt-get install net-tools. (Specifically, by adding RUN apt-get install -y net-tools to your Dockerfile.)

Based on my test, ifconfig is included in ubuntu:14.04.