Zum Hauptinhalt springen
LIVE
CVSS 6.9CVE-2026-137684 | A security flaw has been discovered in eosphoros-ai DB-GPT up to 0.8.3. This affects the function editor_sql_run of the file packages/dbgpt-app/src/dbgpt_app/openapi/api_v1/editor/api_editor_v1.py of the component Editor SQL Run API. Performing a manipulation of the argument db_name results in authorization bypass. It is possible to initiate the attack remotely. The exploit has been released to the public and may be used for attacks. The pull request to fixCVSS 8.7CVE-2026-137992 | libexpat through 2.11.0 contains a denial of service vulnerability in defineAttribute() of lib/xmlparse.c that fails to detect duplicate non-ID #IMPLIED or #REQUIRED attribute declarations. Attackers can supply a crafted XML document with repeated ATTLIST declarations in an internal DTD subset to cause quadratic CPU consumption in storeAtts() during parsing.CVSS 8.5CVE-2026-137994 | Leo through 6.8.10 contains an insecure deserialization vulnerability that allows attackers to execute code by embedding pickled data in unknown XML attributes of .leo outlines. Attackers can place a pickle __reduce__ gadget in a or element attribute that resolveUa passes to pickle.loads, executing code with user privileges when the outline is opened.CVSS 7.0CVE-2026-137995 | FOG Project before 1.6.0.119 contains an information disclosure vulnerability that allows unauthenticated attackers to obtain host tokens from status/hostgetkey.php by supplying a host MAC address. Attackers can present the token to service/hostinfo.php to retrieve decrypted Active Directory join credentials and Windows product keys during deployment windows.CVSS 6.8CVE-2026-137996 | Zettlr before 4.11.0 fails to validate URI schemes in Markdown link targets, allowing attackers to launch arbitrary registered protocol handlers via Electron shell.openExternal without confirmation. Attackers can craft documents whose Ctrl/Cmd-clicked links use smb:// to leak NTLM credential hashes on Windows or invoke custom protocol handlers with attacker-controlled parameters.CVSS 8.5CVE-2026-137997 | HCIPy through 0.7.1 contains an insecure deserialization vulnerability that allows attackers to execute code by supplying crafted .pkl files to read_field, read_grid or read_mode_basis. Because hcipy/util/io.py selects pickle by file extension and calls pickle.load, a __reduce__ gadget in a pupil, apodizer, PSF or mode-basis file runs code with the user's privileges.CVSS 8.5CVE-2026-137998 | Detoxify 0.5.3 through 0.5.4 contains an insecure deserialization vulnerability in load_checkpoint that allows attackers to execute code by supplying a crafted checkpoint file. Attackers can embed a pickle __reduce__ gadget in a .ckpt file loaded via torch.load with weights_only=False to run code with the user's privileges.CVSS 8.5CVE-2026-137999 | JSONSchema2PoPo2 through 3.0.3 contains a code injection vulnerability that allows attackers to inject Python code by supplying JSON Schema default or format values that are written unescaped. Attackers can place a single quote in a string property default to break out of the literal in the generated __init__ signature, executing injected code when the generated module is imported.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

Building Docker Containers with Persistent Storage

One of the first surprises new Docker users encounter is that data disappears when a container is removed. Imagine deploying a web application or a database…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Cloud & Tech-Stack · 4 Min. Lesezeit
Quelle: dev.to
Rubrik: Secure Programming

One of the first surprises new Docker users encounter is that data disappears when a container is removed.



Imagine deploying a web application or a database inside a Docker container. Everything works perfectly until the container crashes or you redeploy your application. Suddenly, all your uploaded files, logs, or database records are gone.



Why?



Because containers are ephemeral by design. They are designed to be created, destroyed, and recreated quickly. Unless data is stored outside the container, it disappears together with the container.



In this article, you'll learn the three common ways Docker handles storage and when each one should be used.









Understanding Docker Storage



There are three common ways to work with data in Docker:




























Storage Type Persists After Container Removal? Managed By
Container Writable Layer ❌ No Docker
Bind Mount ✅ Yes Host Machine
Docker Volume ✅ Yes Docker


Let's explore each one with practical examples.









1. Container Writable Layer (Ephemeral Storage)



By default, every Docker container has a writable layer where files can be created or modified while the container is running.



Think of it like a teacher writing notes on a whiteboard during a class. Once the class ends and the board is cleaned, everything written on it is gone.



Similarly, when a container is removed, everything stored inside its writable layer is lost.






Step 1: Start a container






docker run -it --name notes alpine sh






Inside the container:




echo "My first note" > notes.txt
cat notes.txt






Exit the container:




exit






Remove it:




docker rm notes






Create a new container:




docker run -it --name notes alpine sh






Try reading the file again:




cat notes.txt









Observation



The file no longer exists because it was stored only inside the container.






When is this useful?




  • Temporary files

  • Cache

  • Generated reports

  • Session data









2. Bind Mount



A bind mount connects a folder on your host machine directly into a container.



Think of it as giving someone access to a folder on your computer. They can read from it and write to it, and you can immediately see the changes from your host machine.



Unlike the container's writable layer, the data remains on your computer even after the container is deleted.






Create a folder






mkdir docker-notes






Run the container:




docker run -it \
--name bind-demo \
-v $(pwd)/docker-notes:/app/data \
alpine sh






Inside the container:




echo "Bind Mount Note" > /app/data/notes.txt






Exit:




exit






Verify the file on your host machine:




cat docker-notes/notes.txt






Remove the container:




docker rm bind-demo






Check the file again:




cat docker-notes/notes.txt









Observation



The file is still available because it is stored on the host machine, not inside the container.






Common Use Cases




  • Local development

  • Editing source code

  • Sharing files between host and container









3. Docker Volumes



Docker volumes are the recommended way to persist data in production.



Unlike bind mounts, Docker manages the storage location for you.



Think of a Docker volume as a portable external drive that Docker can attach to any container whenever it starts.



This is the preferred method for storing application and database data.






Create a volume






docker volume create notes-volume






Run a container using the volume:




docker run -it \
--name volume-demo \
-v notes-volume:/app/data \
alpine sh






The option




-v notes-volume:/app/data






attaches the Docker volume to the container.



Inside the container:




echo "Volume Note" > /app/data/notes.txt






Exit:




exit






Remove the container:




docker rm volume-demo






Start another container using the same volume:




docker run -it \
--name volume-demo2 \
-v notes-volume:/app/data \
alpine sh






Check the file:




cat /app/data/notes.txt









Observation



The file still exists because it was stored inside the Docker volume instead of the container.






Common Use Cases




  • Databases

  • Production applications

  • User uploads

  • Application logs









Comparison












































Feature Writable Layer Bind Mount Docker Volume
Persists after container removal ❌ ✅ ✅
Stored on host ❌ ✅ ✅
Managed by Docker ✅ ❌ ✅
Best for Production ❌ ⚠️ Sometimes ✅
Best for Development ❌ ✅ ✅








Which One Should You Use?



Choose the storage option that matches your use case:





  • Container Writable Layer → Temporary data that doesn't need to survive.


  • Bind Mount → Local development where you want to edit files directly on your machine.


  • Docker Volume → Databases and production workloads where persistent storage is essential.









Final Thoughts



Understanding Docker storage is one of the most important skills for anyone learning containers.



If you don't store your data correctly, removing a container can also remove everything your application has generated.



As a general rule:




  • Use the container writable layer for temporary data.

  • Use bind mounts during development.

  • Use Docker volumes in production.



Following these best practices will help you build containerized applications that are reliable, portable, and easier to maintain.









Resources



You can find the complete examples used in this article in my GitHub repository:



👉 https://github.com/highbee2810/Docker_storage_tutorials



If this article helped you, consider leaving a ❤️ and following me for more practical Docker, DevOps, and Cloud tutorials.

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Community discussion & comments

🌐 Join the main chat

Start the discussion in the Social Chat broadcast stream or submit an expert contribution via the supplement form above.

Community Rating & Social Proof
⭐ Reader Rating
–
Ø / 5.0
No reader ratings yet
Was this article helpful?
0
Submit your rating
Detailed rating (optional)
Content & Quality
Source & Credibility
Freshness
Security Briefing Free · 1-Click Unsubscribe

Intelligence Digest — free

The top security news daily · unsubscribe anytime

Related story clusters & sources (vector AI)

2 Cluster
2 sources
OpenAI counter-sues Apple over trade secret theft
AppleInsider News 49 min. ago
1 more source
Similar posts
🔍 Verwandte News

Auch interessante Nachrichten Building Docker Containers with Persistent Storage

Thematisch verwandte Begriffe: Building, Docker, Containers, with · 6 Treffer

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

💬 Loading comments…
Pull to refresh
Widgets & Topics
Loading widgets…
Nächster Beitrag