Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how to get the application folder from the docker image

this is my container running the folder /app copied from the folder express present in my image

this is my image containing the folder express

after dockerising my express app folder I deleted it from my desktop but I still have the image now I need that folder how can I get it from my image

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can run the docker cp command (documentation: https://docs.docker.com/engine/reference/commandline/cp/). The way how to use is the following:

docker cp <container_id_or_name>:/path/in/container /path/in/host

In order to do that, you just need to run a container from the image you have, and then run the docker cp command:

# run a container as deamon
docker run -d --name my-container fahrazzzgb91/merns bash

# from your host, copy the files from the container to the host
docker cp  my-container:/path/to/copy .
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading