Output the yaml build file from an image

Hi
so i have an image of a docker build, that does not have a dockerfile YAML, and was wondering if i can output the build steps or its environment in an exported yaml to rebuild it?

sincerely,

A Dockerfile is not a yaml. You can check the image history.

docker image history mariadb:10.11 --format '{{ .CreatedBy }}' --no-trunc | tail -r

It won’t give you a copy-pasteable list of instructions, but close to that. Except, that it will probably not be obvious what line was for the base image and what for yours.

1 Like