Usually people pull the official Ubuntu / CentOS image, but they donβt realize that these images are minimal and have nothing to do with it.
For Ubuntu, this image was created from official tarfs rootfs provided by Canonical. Given that this is a minimal Ubuntu installation, this default image includes only the C, C.UTF-8, and POSIX locales.
You can install net-tools (including ifconfig, netstat), ip-utils (including ping) and any other similar curl, etc. You can create an image from the container on the container or write a Dockerfile that will install this tool when creating the image.
Below is an example of a Dockerfile, when creating an image from it, the following tools will be used:
FROM vkitpro/ubuntu16.04 RUN apt-get update -y \ && apt-get upgrade -y \ && apt-get install iputils-ping -y \ && apt-get install net-tools -y \ CMD bash
or run the container from the base image and install these utilities in the container, and then capture the image. docker commit -m "any descriptive message" container_id image_name: lattest
Everything will be installed in this image.
Vaseem007 Dec 21 '18 at 5:44 2018-12-21 05:44
source share