Software Engineering

Find out how to Extract the Information in a Docker Picture

Find out how to Extract the Information in a Docker Picture
Written by admin


Ever wanted to extract the recordsdata in a Docker container?

Docker offers the save sub-command.

Exporting Docker recordsdata right into a Tar Archive

The examples beneath use a Docker container known as: aoms/hellojava

Swap this out with your personal container as required.

docker save aoms/hellojava > hellojava.tar

hellojava.tar now incorporates an inventory of recordsdata discovered within the Docker picture.

Taking it one step additional

You may make this a bit higher by extracting it into a brand new listing and untarring mechanically:

mkdir tmpimage && cd $_ && docker save aoms/hellojava > _out.tar && tar -xvf _out.tar && open .

About the author

admin

Leave a Comment