0

I'm trying to "reverse engineer" a docker image, and am using the docker history command. I'm expecting the output to have a "FROM:<base image>" name, but for some reason it will not appear for me.

I used the following commands:

  1. docker pull ubuntu:latest
    
  2. docker run ubuntu
    
  3. docker history --no-trunc ubuntu
    

And I this.

Unless I'm mistaken, there should be a FROM line at the top of the output, right? Since even in this case, the Dockerfile would have had FROM scratch as the first line. Anyone know what is causing this/what I can do to get the FROM line?

P.S. I'm trying to get "reverse engineer" a Docker Image into a Dockerfile so that I can find the Base image a given image was based on. If anyone has any other ideas/easier ways, I'm all ears too!

  • The Docker image history doesn't contain the name of the base image, it just embeds that image's layers. The linked question matches the "P.S." real problem, and it includes a very detailed explanation of what's going on internally. – David Maze Aug 30 '23 at 19:58

0 Answers0