56

How can I install the package for "networks" on a very thin ubuntu image in docker?

I need to add this package in an image using a Dockerfile

muru
  • 207,228
danilo
  • 1,865

2 Answers2

72

I found the answer here:
https://stackoverflow.com/questions/51834978/ip-command-is-missing-from-ubuntu-docker-image

# apt update
# apt install iproute2 -y

My docker container although didn't have iproute2 package installed, the internet connection was active.

danilo
  • 1,865
17

ip program is a part of iproute2 package

user@ubuntu18:~$ dpkg -S ip | grep '/sbin/ip$'
iproute2: /sbin/ip
Viktor
  • 418
  • 1
  • 4
  • 8