Docker Community Forums

Share and learn in the Docker community.

Retrieving base image used for another image


(Miwalker) #1

I see there’s been several old threads on this topic but I’m wondering if anyone’s found a way to retrieve the base image used for another image. I wanted to compare the size differences between the final image and the base image in its dockerfile. I can do this fine if I know the base image name ahead of time, but was hoping to programatically retrieve the base image name and calculate the size difference.

I tried using the chenzj/dfimage image that I found through a google search but the FROM tag returned from running that just referenced the final image and not the base.