Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To keep Docker data after removing a container, store it in a mount rather than only in the container’s writable layer. A Docker volume is usually the simplest choice for Docker-managed persistent data; use a bind mount when the host and container both need a specific path. Neither option is a backup, and the archived CoreOS Container Linux disk-layout guidance applies only to that historical system—not every current CoreOS-family distribution.

Where does Docker container data live?

A container has a writable layer, but files written only there are tied to that container. Docker’s current storage documentation states: “Data written to the container layer doesn’t persist when the container is destroyed.” Removing and replacing a container therefore loses data kept only in that layer.

Docker also stores daemon-managed data such as images and container writable layers on the host. That is distinct from a deliberate data mount: for files that must outlive a particular container, attach a volume or bind mount. A mount changes where the container accesses those files; it does not itself create a backup or copy the data to another host.

Should I use a Docker volume or a bind mount?

Choose based on who needs to manage and access the host files. Docker describes volumes as its preferred mechanism for persisting data generated by and used by containers. Bind mounts are the direct choice when a specific host file or directory must also be visible to processes on the host.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
UGREEN NAS DH2300 2-Bay for Beginners & Personal Users, Phone Backup
  • Entry-level NAS Personal Storage:UGREEN NAS DH2300 is your first and best NAS made easy. It is designed for beginners who want a simple, private way to store videos, photos and personal files, which is intuitive for users moving from cloud storage or external drives and move away from scattered date across devices. This entry-level NAS 2-bay perfect for personal entertainment, photo storage, and easy data backup (doesn't support Docker or virtual machines).
  • Set Your Devices Free, Expand Your Digital World: This unified storage hub supports massive capacity up to 64TB.*Storage drives not included. Stop Deleting, Start Storing. You can store 22 million 3MB images, or 2 million 30MB songs, or 43K 1.5GB movies or 67 million 1MB documents! UGREEN NAS is a better way to free up storage across all your devices such as phones, computers, tablets and also does automatic backups across devices regardless of the operating system—Window, iOS, Android or macOS.
  • The Smarter Long-term Way to Store: Unlike cloud storage with recurring monthly fees, a UGREEN NAS enclosure requires only a one-time purchase for long-term use. For example, you only need to pay $459.98 for a NAS, while for cloud storage, you need to pay $719.88 per year, $2,159.64 for 3 years, $3,599.40 for 5 years. You will save $6,738.82 over 10 years with UGREEN NAS! *NAS cost based on DH2300 + 12TB HDD; cloud cost based on 12TB plan (e.g. $59.99/month).
  • Blazing Speed, Minimal Power: Equipped with a high-performance processor, 1GbE port, and 4GB RAM on Board, this NAS handles multiple tasks with ease. File transfers reach up to 125MB/s—a 1GB file takes only 8 seconds. Don't let slow clouds hold you back; they often need over 100 seconds for the same task. The difference is clear.
  • Let AI Better Organize Your Memories: UGREEN NAS uses AI to tag faces, locations, texts, and objects—so you can effortlessly find any photo by searching for who or what's in it in seconds. It also automatically finds and deletes similar or duplicate photo, backs up live photos and allows you to share them with your friends or family with just one tap. Everything stays effortlessly organized, powered by intelligent tagging and recognition.
Storage choice Best fit Main trade-off
Docker volume Docker-managed data that should outlive a container and may be mounted by multiple containers. Docker manages the host location. Directly changing volume data outside Docker is unsupported or undefined behavior in Docker’s documentation.
Bind mount A particular host path needs to be shared with a container. It depends on host paths and permissions, and host and container processes can modify the same files.
tmpfs Temporary data that should be held in memory rather than persisted. Ephemeral: it does not persist on the host or in the container filesystem after stop/restart or host reboot.
Block device mounted into a volume A workload needs a separately mounted host device or partition. Requires host storage setup and workload-specific validation; the reviewed Docker sources do not establish suitability of consumer external drives for production databases.

See Docker’s documentation for volumes, bind mounts, and storage types.

How do I keep Docker data after removing a container?

Create or use a volume, then mount it at the path where the application reads and writes its data. For example, this runs a container with a named volume mounted at /var/lib/app:

Rank #2
Sale
UGREEN NAS DXP2800 2-Bay for Advanced Home Users, Remote Workers & Creators
  • 【Advanced Home Data & Media Hub】For advanced home users who need phone backup, file storage, and centralized data management. Centralize family photos, 4K videos, movies, computer backups, and personal files in one place while running multiple apps for home entertainment and everyday data management. Suitable for households with growing digital libraries and multiple NAS use cases.
  • 【Built for Creators, Media Servers & Advanced Apps】Powered by the Intel N100 Quad-Core CPU, 8GB DDR5 RAM, 2.5GbE networking, and dual M.2 NVMe slots, DXP2800 handles large files and heavier workloads with ease. Run Docker, virtual machines, and media server applications compatible with Plex—ideal for content creators, tech enthusiasts, and advanced home users managing 4K videos, RAW photos, personal media libraries, and multiple NAS apps.
  • 【Up to 80TB for Growing Digital Libraries】 Supports up to 80TB of storage using two HDD bays and two M.2 NVMe SSD slots for family photos, movies, RAW photos, 4K videos, work files, and device backups. AI photo management supports recognition of people, objects, scenes, and locations, album organization, and duplicate photo detection. HDDs and SSDs are not included.
  • 【AI-powered Home Surveillance】Turn DXP2800 into a centralized home surveillance hub by connecting compatible network cameras and storing recordings locally on your NAS. AI-powered features include Face Recognition, People Detection, and Pet Detection, helping advanced home users review important events more efficiently while managing home surveillance and personal data in one place.
  • 【One data Center Across Your Devices】Keep files from desktops, laptops, phones, tablets, and other devices together instead of scattered across cloud accounts and external drives. Access, back up, organize, and share data across Windows, macOS, Android, iOS, web browsers, and compatible smart TVs—ideal for creators and advanced home users working across multiple devices.
docker volume create app-data
docker run --mount type=volume,src=app-data,dst=/var/lib/app my-image

The named volume remains available after the container is removed. To use the same volume with a replacement container, mount it at the same application data path. Docker’s run documentation describes the --mount syntax.

For shared host access, mount a chosen host path instead. This example uses an explicit bind mount:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Synology DS225+ Private Cloud Media Server - Stream, Back Up Photos & Share Files, Intel CPU for Hardware Transcoding (2-Bay Diskless NAS)
  • Your Personal Streaming Server - Build your own Netflix-style media library and stream 4K movies, shows and photos to any device without monthly fees
  • Create Your Own Cloud - Store your entire photo, video and music collection; access from anywhere with fast 282 MB/s transfer speeds
  • Creator-Grade Backup Solution - Protect your irreplaceable content with automated backups to cloud services, external drives and remote NAS
  • Multi-Layered Data Protection - Combine RAID redundancy, automated backups and snapshot technology to prevent data loss from any cause
  • Smart Home Surveillance - Support up to 30 IP cameras with AI detection, instant alerts and secure remote monitoring
docker run --mount type=bind,src=/srv/app-data,dst=/var/lib/app my-image

The source path is on the Docker host; ensure it exists as needed and that permissions suit the application. With either mount type, take care when mounting over files already present in the container image. In particular, mounting a non-empty volume over a populated container path obscures the underlying files at that path while the mount is in place.

Where are Docker volumes stored?

Docker manages volume storage on the host used by the Docker daemon. The location depends on the daemon’s storage setup; treat the volume as Docker-managed rather than relying on a fixed host path. Docker warns that directly manipulating volume contents outside Docker is unsupported or undefined behavior. A local named volume is not automatically copied or replicated to another machine.

Rank #4
Sale
UGREEN NAS DH4300 Plus 4-Bay for Beginners, Home Users & Remote Workers
  • Entry-level NAS Home Storage: The UGREEN NAS DH4300 Plus is an entry-level 4-bay NAS that's ideal for home media and vast private storage you can access from anywhere and also supports Docker but not virtual machines. You can record, store, share happy moment with your families and friends, which is intuitive for users moving from cloud storage, or external drives to create your own private cloud, access files from any device.
  • Smart Photo Backup & AI Album: Automatically back up photos and videos from your phone in real time and keep growing family memories organized with AI-powered photo albums. Semantic search, custom learning, and recognition of people, objects, pets, and similar photos help you quickly find the moments you want. Duplicate photo removal also helps keep your library organized—ideal for families and users with large photo collections.
  • User-Friendly App & Easy Setup: Connect quickly via NFC, set up simply and share files fast on Windows, macOS, Android, iOS, web browsers, and smart TVs. You can access data remotely from any of your mixed devices. What's more, UGREEN NAS enclosure comes with beginner-friendly user manual and video instructions to ensure you can easily take full advantage of its features.
  • More Cost-effective Storage Solution: Unlike cloud storage with recurring monthly fees, A UGREEN NAS enclosure requires only a one-time purchase for long-term use. For example, you only need to pay $629.99 for a NAS, while for cloud storage, you need to pay $719.88 per year, $1,439.76 for 2 years, $2,159.64 for 3 years, $7,198.80 for 10 years. You will save $6,568.81 over 10 years with UGREEN NAS! *NAS cost based on DH4300 Plus + 12TB HDD; cloud cost based on 12TB plan (e.g. $59.99/month).
  • Your Data, You Control:No third-party clouds, no hidden access, UGREEN NAS provides a more secure and private data storage solution. It stores data locally on your private hard drives and does automatic backups. Thus, you can keep full control over it. The advanced encryption is TRUSTe certified in the United States and is awarded the first (and only) ETSI EN 303 645 certification mark for NAS products by TÜV SÜD Group.

Docker volumes can be mounted by more than one container, and Docker can prune unused volumes. Before running cleanup commands, confirm that no volume being pruned contains data you still need. For backup and restore, use Docker’s volume guidance and test that the restored data is usable.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Will Docker data survive a CoreOS update?

For the system specifically documented in the archived CoreOS Container Linux disk-layout page, the root partition held stateful data—including container images—on a read/write filesystem mounted at /. The document describes a read-only /usr and an update process that did not manipulate data on the ROOT partition. It lists EXT4, BTRFS, and XFS as supported filesystem formats for that layout.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
BUFFALO LinkStation 210 2TB 1-Bay NAS Network Attached Storage with HDD Hard Drives Included NAS Storage that Works as Home Cloud or Network Storage Device for Home
  • Value NAS with RAID for centralized storage and backup for all your devices. Check out the LS 700 for enhanced features, cloud capabilities, macOS 26, and up to 7x faster performance than the LS 200.
  • Connect the LinkStation to your router and enjoy shared network storage for your devices. The NAS is compatible with Windows and macOS*, and Buffalo's US-based support is on-hand 24/7 for installation walkthroughs. *Only for macOS 15 (Sequoia) and earlier. For macOS 26, check out our LS 700 series.
  • Subscription-Free Personal Cloud – Store, back up, and manage all your videos, music, and photos and access them anytime without paying any monthly fees.
  • Storage Purpose-Built for Data Security – A NAS designed to keep your data safe, the LS200 features a closed system to reduce vulnerabilities from 3rd party apps and SSL encryption for secure file transfers.
  • Back Up Multiple Computers & Devices – NAS Navigator management utility and PC backup software included. NAS Navigator 2 for macOS 15 and earlier. You can set up automated backups of data on your computers.

This is historical guidance for CoreOS Container Linux, not a guarantee for every system now called CoreOS. Fedora CoreOS, RHEL CoreOS, and Flatcar have their own version-specific storage and update behavior; check the documentation for the exact distribution and release before relying on a path or partition surviving an update. For provisioning, Ignition can perform disk-related setup during initramfs, but supported configuration schemas and behavior depend on the target distribution and version.

How do I mount a disk into a Docker container?

A separate disk or partition must first be made available and mounted on the Docker host. You can then expose the host mount point to a container with a bind mount, or configure storage so Docker uses the device-backed location for a volume. The right setup depends on the host operating system and workload; Docker’s storage documentation does not establish that a consumer external drive is suitable for a production database.

  • Confirm the target host’s supported disk, filesystem, and mount configuration.
  • Choose a stable host mount point and verify ownership and permissions for the container process.
  • Mount that host path into the container and validate application behavior, including restart and recovery.
  • Keep an independent backup: a mounted disk is still a single storage location unless data is separately backed up or replicated.

Does persistent storage mean the data is backed up?

No. A volume helps data outlive an individual container; it does not protect against host failure, accidental deletion, corruption, or loss of the storage device. Plan separate backups and a recovery procedure, and test restores. Replication is also a separate design choice: a Docker volume on one daemon host does not become shared across hosts automatically.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.