How you can Extract the Information in a Docker Picture

Ever wanted to extract the recordsdata in a Docker container?

Docker supplies the save sub-command.

Exporting Docker recordsdata right into a Tar Archive

The examples under 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 a listing 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 robotically:

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

Leave a Reply