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 in Docker by akhtar
• 10,580 points
36 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 by MD
• 23,050 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
170 views
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,540 points
144 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
515 views
0 votes
1 answer

How to run a docker command from inside the container?

You must have come across the /var/run/docker.sock file, ...READ MORE

answered Jun 28, 2018 in Docker by Sophie may
• 9,940 points
957 views
0 votes
1 answer
0 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
• 57,530 points
538 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 in Docker by MD
• 23,050 points
225 views
0 votes
1 answer

run script shell inside docker app and mongodb container not working?

Hi, I think this error occurs because you ...READ MORE

answered Mar 9 in Docker by MD
• 23,050 points
348 views