Is my data stored permanently inside docker container

0 votes

Hi Guys,

I am new in docker. I launched one container to host my webserver. But is my data stored permanently inside docker?

Thank You

Apr 6, 2020 in Docker by akhtar
• 38,260 points
1,220 views

1 answer to this question.

0 votes

Hi@akhtar,

Yes, whatever you stored inside docker container is permanent. But one thing you should understand, difference between ephemeral and persistent storage. Let's discuss with an example.

Say, You have a webserver inside docker container. Everyday lots of data is uploaded in your server. Now if you shut down your container, your data will not erase from your container. You can start your container and check it.

But, after some days if you don't require that webserver than you will terminate that container and now your data is permanently gone. So, these types of storage is called ephemeral storage, that depends on OS.

But, if you terminate your container and this time you require that database, for that you have to use persistent storage. This types of storage will not depend on OS.

Hope these will clear your doubt regarding storage in docker.

Thank You

answered Apr 6, 2020 by MD
• 95,460 points

Related Questions In Docker

0 votes
1 answer

Will I lose my data, when a docker container exists?

No, you won’t lose any data when ...READ MORE

answered Jul 30, 2019 in Docker by Kavya
8,150 views
0 votes
1 answer
0 votes
1 answer

Different file owner inside Docker container and in host machine Ask

Filesystems, at least in Unix- and Linux-like ...READ MORE

answered Jun 25, 2018 in Docker by Damon Salvatore
• 5,980 points
960 views
0 votes
1 answer

Different file owner inside Docker container and in host machine

Here is what you can try. Since ...READ MORE

answered Jun 27, 2018 in Docker by Atul
• 10,240 points
1,952 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,020 points
2,729 views
0 votes
1 answer

Yum is not working inside docker container!

Hi@akhtar, Sometime dns is not able to resolve ...READ MORE

answered Apr 22, 2020 in Docker by MD
• 95,460 points
6,303 views
+15 votes
19 answers

How can I run a ‘docker exec’ command inside a docker container?

you can run any command in a ...READ MORE

answered Dec 10, 2018 in Docker by Pramiti
1,229,685 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP