What happens to data inside a container when it is removed with docker rm?

Docker Fundamentals Medium

Docker Fundamentals — Medium

What happens to data inside a container when it is removed with docker rm?

Key points

  • Data in the container's writable layer is not automatically backed up to Docker Hub.
  • Data is not moved to a specific directory on the host for recovery.
  • Data is not retained in the image for the next container started from that image.
  • Only data persisted in a volume or bind mount will survive container removal.

Ready to go further?

Related questions