Tuesday, February 21, 2023
HomeSoftware EngineeringEasy methods to Extract the Recordsdata in a Docker Picture

Easy methods to Extract the Recordsdata in a Docker Picture


Ever wanted to extract the recordsdata in a Docker container?

Docker gives the save sub-command.

Exporting Docker recordsdata right into a Tar Archive

The examples under use a Docker container referred to as: aoms/hellojava

Swap this out with your personal container as required.

docker save aoms/hellojava > hellojava.tar

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

Taking it one step additional

You can also 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 .



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments