Where Data Lives: volume, bind mount, tmpfs, and no mount
Where container data lives and whether it survives deletion: writable layer, volume, bind mount, tmpfs, and WSL 2 mount performance.
DockerVolumebind mountDelete a container and whatever you wrote into its writable layer is gone. To keep data, put it outside the container. This page makes the four destinations clear. Toggle the four modes below to see where data actually lands and whether it survives deletion:
Without a mount, data is in the container writable layer
A container has a writable layer on top of the read-only image layers. Without a mount, files you write land there, using copy-on-write (CoW): editing an existing file copies the whole file from the read-only layer up to the writable layer first, then edits the copy.
Changing one byte of a 1 GB file still copies the whole file first, so write-heavy work is noticeably slow.
The writable layer follows the container lifecycle; docker rm wipes it all.
So databases, data you need to keep, and high-I/O workloads should never live only in the writable layer.
Under the WSL 2 backend, that path is inside the docker-desktop-data WSL VM, not on the Windows filesystem, so you cannot browse into it from File Explorer. To read volume contents:
docker run --rm -v my-vol:/data alpine ls /data # mount it into a container to look
Two syntaxes for the same thing, but --mount is explicit and officially preferred:
# -v: short, but ambiguousdocker run -v /host/data:/app/data:ro app# --mount: explicit type, no ambiguitydocker run --mount type=bind,source=/host/data,target=/app/data,readonly app
Behavior
--mount type=bind
-v
Host path missing
Errors, refuses
Creates an empty directory
Relative path (./data)
Treated as a bind mount
May be treated as a named volume name
The -v relative-path trap: -v mydata:/app/data (no leading slash) is treated as “create a named volume called mydata”, not a bind mount. To be sure it is a bind mount, use an absolute path or the explicit --mount type=bind.
-v with only a container path and no name creates a random-UUID anonymous volume. The Dockerfile VOLUME instruction also auto-creates an anonymous volume mounted at that path on docker run.
FROM node:20WORKDIR /appCOPY . .RUN npm install # node_modules goes into the image layerVOLUME /app # trap: at run time an anonymous volume mounts over /app, shadowing node_modules
At docker run an anonymous volume mounts over /app, shadowing the node_modules the image layer installed, and the app will not start. Fix: do not declare VOLUME on a path that gets shadowed, or skip VOLUME and mount explicitly at docker run / Compose.A container deleted without --rm leaves a dangling anonymous volume; clear it with docker volume prune.
High-I/O data (source code, node_modules, database files) should sit on the WSL 2 Linux filesystem and be bind-mounted from there. Do not mount from /mnt/c (Windows paths):
docker run -v ~/my-project:/sources app # correct: WSL 2 Linux filesystemdocker run -v /mnt/c/Users/me/project:/sources app # avoid: cross-OS boundary, slow
Official guidance: bind mounts from the Windows filesystem are noticeably slower, and inotify events only work on the Linux filesystem, so mounting /mnt/c breaks hot reload (Vite, webpack, nodemon) because file-change events never fire. For high-I/O cases, prefer named volumes or bind mounts originating on the WSL 2 Linux side.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Felimet Hub","description":"Felimet Hub:人工智慧、電腦視覺與跨領域智慧系統的研究與實作,收錄論文、研究計畫、系統專案與技術筆記,題目包括乳牛跛行辨識與非接觸體重估計、彩色紋影流場量測,以及植物病害影像檢測。","colors":{"primary":"#bf7551","light":"#cf8a68","dark":"#a85f3f"},"logo":{"light":"https://mintcdn.com/felimet/o4nUK2uwNPSF27VA/images/logo-wordmark.svg?fit=max\u0026auto=format\u0026n=o4nUK2uwNPSF27VA\u0026q=85\u0026s=fdb2230ec10839b256cde63a087a0770","dark":"https://mintcdn.com/felimet/o4nUK2uwNPSF27VA/images/logo-wordmark-dark.svg?fit=max\u0026auto=format\u0026n=o4nUK2uwNPSF27VA\u0026q=85\u0026s=d154a85870149c6a6b27c95c971566a8","href":"https://felimet-hub.jmcores.com"},"favicon":"https://mintcdn.com/felimet/o4nUK2uwNPSF27VA/favicon.svg?fit=max\u0026auto=format\u0026n=o4nUK2uwNPSF27VA\u0026q=85\u0026s=d42a467f2f182edb4a995c867037d5f9","appearance":{"default":"system"},"background":{"color":{"light":"#F9F7F2","dark":"#1F1F21"}},"navbar":{"links":[{"href":"https://github.com/felimet","label":"GitHub"},{"href":"https://www.linkedin.com/in/jiamingzhoufelimet","label":"LinkedIn"}]},"footer":{"socials":{"github":"https://github.com/felimet","linkedin":"https://www.linkedin.com/in/jiamingzhoufelimet"},"links":[{"header":"探索 / Explore","items":[{"label":"Projects","href":"/projects/overview"},{"label":"Notes","href":"/notes/overview"},{"label":"Publications","href":"/publications/overview"},{"label":"About","href":"/about"}]},{"header":"學術 / Academic","items":[{"label":"ORCID","href":"https://orcid.org/0009-0001-5781-0624"},{"label":"Web of Science","href":"https://www.webofscience.com/wos/author/record/LKM-9772-2024"}]},{"header":"連結 / Connect","items":[{"label":"GitHub","href":"https://github.com/felimet"},{"label":"LinkedIn","href":"https://www.linkedin.com/in/jiamingzhoufelimet"},{"label":"Email","href":"mailto:jm.zhou@jmcores.com"}]},{"header":"實驗室 / Lab","items":[{"label":"ISSP \u0026 MES LAB","href":"https://www.issp-mes.org/"},{"label":"IMES LAB","href":"https://imes.issp-mes.org/"}]}]},"seo":{"metatags":{"og:type":"website","og:site_name":"Felimet Hub","og:locale":"zh_TW","twitter:card":"summary_large_image","theme-color":"#bf7551"},"indexing":"all"},"fonts":{"heading":{"family":"Crimson Pro"},"body":{"family":"Noto Sans TC"}},"icons":{"library":"lucide"},"contextual":{"options":["copy","view","chatgpt","claude","add-mcp","cursor","vscode"],"display":"header"},"thumbnails":{"background":"https://mintcdn.com/felimet/qyBsbN2az_bER7x0/images/og-background.png?fit=max\u0026auto=format\u0026n=qyBsbN2az_bER7x0\u0026q=85\u0026s=053f251bf4a67f3c767f022edefdc78d"},"styling":{"latex":true},"navigation":{"languages":[{"language":"zh-Hant","href":"projects/overview"},{"language":"en","href":"en/projects/overview"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"felimet","hasAudioNarration":false,"actualSubdomain":"felimet","customDomains":["felimet-hub.jmcores.com"],"gitSource":{"type":"github","owner":"felimet","repo":"felimet-hub","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"collectionId":"41522fb3-d8b3-4bdd-bcc7-3d1a1e6f657d","liveDeploymentHistoryId":"6adf3d1df325da4ba4e0c218","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adf3d1df325da4ba4e0c218"},"feedback":{"agentFeedback":false,"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6adf3d1df325da4ba4e0c218","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"zh-Hant","tag":"Code Agent","count":38},{"language":"en","tag":"Code Agent","count":38},{"language":"zh-Hant","tag":"Notes","count":20},{"language":"en","tag":"Notes","count":20},{"language":"zh-Hant","tag":"Projects","count":13},{"language":"en","tag":"Projects","count":13},{"language":"zh-Hant","tag":"Part IV 客製化、整合與自動化","count":12},{"language":"zh-Hant","tag":"Docker","count":12},{"language":"en","tag":"Part IV Customization","count":12},{"language":"en","tag":"Docker","count":12},{"language":"zh-Hant","tag":"Publications","count":10},{"language":"en","tag":"Publications","count":10},{"language":"zh-Hant","tag":"Part I 基礎與進階認識","count":7},{"language":"en","tag":"Part I Foundations","count":7},{"language":"zh-Hant","tag":"Part II 進階調適與設定","count":6},{"language":"zh-Hant","tag":"使用與設定","count":6},{"language":"zh-Hant","tag":"研討會論文","count":6},{"language":"en","tag":"Part II Configuration","count":6},{"language":"en","tag":"Usage \u0026 Config","count":6},{"language":"en","tag":"Conference Papers","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--wabi-sienna:#bf7551;--wabi-indigo:#5b6c8f;--wabi-sage:#8a9a7b;--wabi-ochre:#c9a35b;--wabi-cream:#f9f7f2;--wabi-slate:#1f1f21}@font-face{font-family:\"QuoteLatin\";font-weight:100 900;src:local(\"Segoe UI\"),local(\"Helvetica Neue\"),local(\"Helvetica\"),local(\"Arial\"),local(\"Roboto\"),local(\"Noto Sans\");unicode-range:U+2018,U+2019,U+201C,U+201D}.prose :where([data-as=\"p\"], p, li, td, th, blockquote, figcaption, dt, dd, caption),[class*=mdx-content] :where([data-as=\"p\"], p, li, td, th, blockquote, figcaption, dt, dd, caption){font-family:\"QuoteLatin\",\"Noto Serif\",\"Noto Sans TC\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",system-ui,sans-serif!important}.prose :where([data-as=\"p\"], p, li, blockquote, dd):where(:not(.home-hero *)):where(:not(.references *)):where(:not(.card *)),[class*=mdx-content] :where([data-as=\"p\"], p, li, blockquote, dd):where(:not(.home-hero *)):where(:not(.references *)):where(:not(.card *)){text-align:justify;hyphens:auto;overflow-wrap:break-word;text-align-last:auto}@media (max-width:760px){.prose :where([data-as=\"p\"], p, li, blockquote, dd):where(:not(.home-hero *)):where(:not(.references *)):where(:not(.card *)),[class*=mdx-content] :where([data-as=\"p\"], p, li, blockquote, dd):where(:not(.home-hero *)):where(:not(.references *)):where(:not(.card *)){text-align:left}}.prose :where([data-as=\"p\"], p, li, blockquote, dd) :where(code:not(pre *)),[class*=mdx-content] :where([data-as=\"p\"], p, li, blockquote, dd) :where(code:not(pre *)){white-space:normal;word-break:break-all}.prose :where([data-as=\"p\"], p, li, blockquote, dd) :where(a),[class*=mdx-content] :where([data-as=\"p\"], p, li, blockquote, dd) :where(a){overflow-wrap:anywhere}.references [data-as=p],.references li,.references p{text-align:start}.card,[class*=card]:not([class*=g-card]){border-radius:16px 20px 18px 22px/20px 16px 22px 18px}.prose a:not(.card):not([class*=button]):not(.g-card){text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--wabi-sienna) 40%,transparent);text-underline-offset:3px;transition:text-decoration-color .2s ease,color .2s ease}.prose a:not(.card):not([class*=button]):not(.g-card):hover{text-decoration-color:var(--wabi-sienna)}.g-card,.g-card:hover,.prose a.g-card{text-decoration:none!important}pre code{font-size:.85rem;line-height:1.65}.g-filter-label{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;font-weight:600;color:#a89e90}.g-chip,.g-sort{padding:.25rem .6rem;border-radius:8px;border:1px solid rgba(120,110,95,.25);background:0 0;color:inherit;cursor:pointer;font-size:.78rem}.dark .g-chip,.dark .g-sort{border-color:rgba(255,255,255,.16)}.g-chip{padding:.2rem .7rem;color:#5c554b;line-height:1.6;transition:all .15s ease}.dark .g-chip{color:#c4bcae}.g-chip-on{border-color:#bf7551;background:rgba(191,117,81,.12);color:#bf7551;font-weight:600}.dark .g-chip-on{color:#d79873;border-color:#cf8a68}.g-more{border:0;background:0 0;color:#bf7551;cursor:pointer;font-size:.78rem;text-decoration:underline;text-underline-offset:2px}.dark .g-more{color:#d79873}.g-card{display:flex;flex-direction:column;padding:1.2rem;border:1px solid rgba(120,110,95,.18);border-radius:14px;background:rgba(120,110,95,.045);transition:border-color .15s ease,background .15s ease}.g-card:hover{border-color:#bf7551}.dark .g-card{border-color:rgba(255,255,255,.1);background:rgba(255,255,255,.035)}.dark .g-card:hover{border-color:#cf8a68}.g-card-title{font-weight:600;margin-bottom:.4rem;line-height:1.4;color:#2b343b}.dark .g-card-title{color:#ece6da}.g-card-desc{font-size:.82rem;line-height:1.55;flex:1;color:#5c554b}.dark .g-card-desc{color:#b8b0a2}.g-card-meta{margin-top:.9rem;padding-top:.7rem;border-top:1px solid rgba(120,110,95,.15)}.dark .g-card-meta{border-top-color:rgba(255,255,255,.08)}.g-card-venue{font-size:.68rem;color:#b48a4e;margin-bottom:.4rem}.dark .g-card-venue{color:#d2a85f}.g-tag{font-size:.66rem;padding:.08rem .45rem;border-radius:6px;background:rgba(120,110,95,.12);color:#5c554b}.dark .g-tag{background:rgba(255,255,255,.08);color:#b8b0a2}.g-tag-more{font-size:.66rem;color:#a89e90}:focus-visible{outline:2px solid var(--wabi-sienna);outline-offset:2px;border-radius:2px}.tool-grid img{width:40px;height:40px;background:#faf8f3;border:1px solid rgba(120,110,95,.15);border-radius:42% 58% 53% 47%/55% 45% 56% 44%;padding:7px;box-sizing:content-box;transition:transform .15s ease,border-color .15s ease,border-radius .25s ease}.tool-grid img:hover{border-radius:55% 45% 47% 53%/44% 56% 45% 55%;transform:translateY(-2px);border-color:var(--wabi-sienna)}html:not(.dark) .home-body :is(h1, h2, h3),html:not(.dark) .home-hero h1{color:#2b343b!important}html:not(.dark) .home-body>:is(p, [data-as=\"p\"]){color:#3a4148!important}.dark .home-body :is(h1, h2, h3),.dark .home-hero h1{color:#ece6da!important}.dark .home-body>:is(p, [data-as=\"p\"]){color:#c9c2b4!important}.home-body h2{font-size:1.5rem;font-weight:600;line-height:1.35;margin:.5rem 0 .6rem}.home-body h2+:is(p, [data-as=\"p\"]){display:block;margin-bottom:1.25rem}#localization-select-trigger{margin-left:.85rem!important}.card:hover,[class*=card]:not([class*=g-card]):hover{border-color:var(--wabi-sienna)!important}#footer a[href*=poweredBy]{display:none!important}@layer theme{html[data-page-mode=custom] #footer{display:flex!important}}#custom-copyright{font-size:.8rem;line-height:1.5;color:color-mix(in srgb,var(--wabi-sienna) 75%,transparent);margin:0;padding:0}#footer>#custom-copyright{width:100%;text-align:center;padding:.75rem 0 0}#custom-copyright .custom-copyright-link{color:var(--wabi-sienna);text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--wabi-sienna) 50%,transparent);text-underline-offset:2px;transition:text-decoration-color .2s ease}#custom-copyright .custom-copyright-link:hover{text-decoration-color:var(--wabi-sienna)}"}],"page":{"pagePath":"en/notes/docker/guide/storage","slug":"/en/notes/docker/guide/storage","pageMetadata":{"title":"Where Data Lives: volume, bind mount, tmpfs, and no mount","description":"Where container data lives and whether it survives deletion: writable layer, volume, bind mount, tmpfs, and WSL 2 mount performance.","tags":["Docker","Volume","Containers"],"gallery":false,"lastUpdated":"2026-06-10T00:00:00.000Z","og:image":"https://felimet-hub.jmcores.com/images/og/en/notes/docker/guide/storage.png","href":"/en/notes/docker/guide/storage"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Where container data lives and whether it survives deletion: writable layer, volume, bind mount, tmpfs, and WSL 2 mount performance.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const StorageMounts=({lang=`zh`})=>{const t=lang===`en`?{lead:`Pick a mount mode to see where the data lives.`,loc:`Where data lives`,survive:`Survives container rm`,share:`Shareable across containers`,perf:`Performance`,use:`Best for`,yes:`Yes`,no:`No`,cwrite:`Container`}:{lead:`撥一種掛載模式,看資料實際存在哪。`,loc:`資料存哪`,survive:`容器刪除後還在`,share:`可跨容器共享`,perf:`效能`,use:`適用場景`,yes:`在`,no:`不在`,cwrite:`容器`};const MODES=lang===`en`?[{key:`none`,name:`No mount`,sub:`writable layer`,loc:`Container writable layer (copy-on-write, on top of the image layers)`,locTag:`Writable layer`,survive:false,share:false,perf:`Slower for writes: copy-on-write copies the whole file even for a 1-byte change`,use:`Throwaway data you never need to keep`,note:`Anything written without a mount lives only inside the container. docker rm wipes it.`},{key:`volume`,name:`Volume`,sub:`named`,loc:`/var/lib/docker/volumes/\u003cname>/_data (under the WSL 2 backend it sits inside the docker-desktop-data VM, not on the Windows filesystem)`,locTag:`Docker-managed`,survive:true,share:true,perf:`Same as native host filesystem; no cross-OS boundary`,use:`Databases, persistent app data, backup and migration`,note:`Docker manages it. Survives container deletion until you docker volume rm it. The recommended default for persistence.`},{key:`bind`,name:`Bind mount`,sub:`host path`,loc:`Any host path you point at (absolute path)`,locTag:`Host path`,survive:true,share:true,perf:`Native on Linux; mounting from /mnt/c (Windows) under WSL 2 is noticeably slower and inotify is unreliable`,use:`Live-syncing source code in dev, injecting config files`,note:`The host file stays after the container is gone. With -v a missing relative path becomes a named volume, not a bind mount: use --mount type=bind to avoid the trap.`},{key:`tmpfs`,name:`tmpfs`,sub:`in memory`,loc:`Host RAM only, never written to disk`,locTag:`Host memory`,survive:false,share:false,perf:`Fastest (RAM I/O)`,use:`Secrets you do not want on disk, ephemeral scratch cache; Linux only`,note:`Gone the moment the container stops. Cannot be shared between containers.`}]:[{key:`none`,name:`無掛載`,sub:`可寫層`,loc:`容器可寫層(writable layer,疊在映像層之上,走 copy-on-write)`,locTag:`可寫層`,survive:false,share:false,perf:`寫入較慢:改一個 byte 也要整檔複製(copy-on-write)`,use:`用完即丟、完全不需要保留的資料`,note:`沒掛載時寫的東西只活在容器裡,docker rm 就一起消失。`},{key:`volume`,name:`Volume`,sub:`具名`,loc:`/var/lib/docker/volumes/\u003cname>/_data(WSL 2 後端下這條路徑在 docker-desktop-data VM 裡,不在 Windows 檔案系統)`,locTag:`Docker 管理`,survive:true,share:true,perf:`等同主機檔案系統原生速度,不跨 OS 邊界`,use:`資料庫、需持久化的應用資料、備份與遷移`,note:`由 Docker 管理。容器刪掉 volume 仍在,要明確 docker volume rm 才會消失。持久化的預設首選。`},{key:`bind`,name:`Bind mount`,sub:`主機路徑`,loc:`你指定的任一主機路徑(絕對路徑)`,locTag:`主機路徑`,survive:true,share:true,perf:`Linux 原生速度;WSL 2 下從 /mnt/c(Windows)掛載會明顯變慢,且 inotify 不可靠`,use:`開發時即時同步程式碼、注入設定檔`,note:`容器刪了主機檔案還在。用 -v 時,找不到的相對路徑會被當成具名 volume 而非 bind mount,改用 --mount type=bind 杜絕這個雷。`},{key:`tmpfs`,name:`tmpfs`,sub:`記憶體`,loc:`只在主機記憶體(RAM),不落磁碟`,locTag:`主機記憶體`,survive:false,share:false,perf:`最快(RAM I/O)`,use:`不想落地的敏感憑證、暫存快取;僅限 Linux`,note:`容器一停就消失,不能跨容器共享。`}];const[sel,setSel]=useState(1);const idx=Math.min(sel,MODES.length-1);const cur=MODES[idx];const css=`\n .sm-root{--sm-bg:#FAF8F3;--sm-surface:rgba(0,0,0,0.025);--sm-border:rgba(0,0,0,0.09);--sm-text:#2b2722;--sm-dim:#6f6a62;--sm-faint:#8a8378;--sm-accent:#bf7551;--sm-ok:#5f8a52;--sm-warn:#c0792f;border:1px solid var(--sm-border);border-radius:14px;background:var(--sm-bg);color:var(--sm-text);overflow:hidden;font-family:ui-sans-serif,system-ui,\"Noto Sans TC\",sans-serif;}\n .dark .sm-root{--sm-bg:#1b1a18;--sm-surface:rgba(255,255,255,0.03);--sm-border:rgba(255,255,255,0.08);--sm-text:#e7e3da;--sm-dim:#a8a299;--sm-faint:#8a8378;--sm-accent:#cf8a68;--sm-ok:#86b274;--sm-warn:#d7a043;}\n .sm-head{padding:13px 18px 11px;border-bottom:1px solid var(--sm-border);font-size:12.5px;color:var(--sm-dim);display:flex;align-items:center;gap:8px;}\n .sm-head-ic{color:var(--sm-accent);flex-shrink:0;}\n .sm-tabs{display:flex;gap:8px;padding:14px 16px 4px;flex-wrap:wrap;}\n .sm-tab{flex:1 1 110px;min-width:104px;text-align:left;background:transparent;border:1px solid var(--sm-border);border-radius:11px;padding:10px 12px;cursor:pointer;color:inherit;font:inherit;transition:border-color .15s,background .15s,box-shadow .15s;}\n .sm-tab:hover{background:var(--sm-surface);}\n .sm-tab-on{border-color:rgba(191,117,81,.5);background:rgba(191,117,81,.07);box-shadow:0 0 0 3px rgba(191,117,81,.1);}\n .sm-tab-name{font-size:14px;font-weight:650;line-height:1.25;}\n .sm-tab-on .sm-tab-name{color:var(--sm-accent);}\n .sm-tab-sub{font-size:11.5px;color:var(--sm-faint);margin-top:2px;}\n .sm-diagram{display:flex;align-items:center;gap:10px;padding:14px 16px 4px;}\n .sm-node{flex:1 1 0;min-width:0;border:1px solid var(--sm-border);border-radius:10px;padding:10px 12px;background:var(--sm-surface);}\n .sm-node-l{font-size:11px;text-transform:uppercase;letter-spacing:.4px;color:var(--sm-faint);margin-bottom:3px;}\n .sm-node-v{font-size:13.5px;font-weight:600;}\n .sm-arrow{flex-shrink:0;display:flex;flex-direction:column;align-items:center;color:var(--sm-dim);font-size:10.5px;gap:1px;}\n .sm-arrow svg{width:26px;height:18px;}\n .sm-loc-ok{border-color:rgba(95,138,82,.4);background:rgba(95,138,82,.08);}\n .sm-loc-eph{border-color:rgba(192,121,47,.4);background:rgba(192,121,47,.08);}\n .sm-loc-ok .sm-node-v{color:var(--sm-ok);}\n .sm-loc-eph .sm-node-v{color:var(--sm-warn);}\n .sm-body{padding:8px 16px 16px;}\n .sm-specs{border:1px solid var(--sm-border);border-radius:10px;overflow:hidden;margin-bottom:11px;}\n .sm-row{display:flex;border-top:1px solid var(--sm-border);font-size:13px;}\n .sm-row:first-child{border-top:none;}\n .sm-k{width:34%;flex-shrink:0;padding:8px 12px;color:var(--sm-dim);background:var(--sm-surface);}\n .sm-v{flex:1 1 0;min-width:0;padding:8px 12px;font-weight:500;}\n .sm-pill{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;font-weight:650;}\n .sm-pill-ok{color:var(--sm-ok);}\n .sm-pill-no{color:var(--sm-warn);}\n .sm-dot{width:8px;height:8px;border-radius:50%;display:inline-block;}\n .sm-dot-ok{background:var(--sm-ok);}\n .sm-dot-no{background:var(--sm-warn);}\n .sm-note{font-size:13px;line-height:1.6;color:var(--sm-dim);padding:0 2px;}\n @media (max-width:600px){.sm-diagram{flex-direction:column;align-items:stretch;}.sm-arrow{flex-direction:row;}.sm-arrow svg{transform:rotate(90deg);}.sm-k{width:42%;}}\n `;const Pill=({ok})=>_jsxs(`span`,{className:`sm-pill `+(ok?`sm-pill-ok`:`sm-pill-no`),children:[_jsx(`span`,{className:`sm-dot `+(ok?`sm-dot-ok`:`sm-dot-no`)}),ok?t.yes:t.no]});const locClass=cur.survive?`sm-loc-ok`:`sm-loc-eph`;return _jsxs(`div`,{className:`sm-root`,children:[_jsx(`style`,{children:css}),_jsxs(`div`,{className:`sm-head`,children:[_jsxs(`svg`,{className:`sm-head-ic`,xmlns:`http://www.w3.org/2000/svg`,width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[_jsx(`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`}),_jsx(`path`,{d:`M3 5v14a9 3 0 0 0 18 0V5`}),_jsx(`path`,{d:`M3 12a9 3 0 0 0 18 0`})]}),t.lead]}),_jsx(`div`,{className:`sm-tabs`,children:MODES.map((m,i)=>_jsxs(`button`,{type:`button`,className:`sm-tab`+(i===idx?` sm-tab-on`:``),onClick:()=>setSel(i),children:[_jsx(`div`,{className:`sm-tab-name`,children:m.name}),_jsx(`div`,{className:`sm-tab-sub`,children:m.sub})]},m.key))}),_jsxs(`div`,{className:`sm-diagram`,children:[_jsxs(`div`,{className:`sm-node`,children:[_jsx(`div`,{className:`sm-node-l`,children:t.cwrite}),_jsx(`div`,{className:`sm-node-v`,children:`docker run …`})]}),_jsxs(`div`,{className:`sm-arrow`,children:[_jsxs(`svg`,{viewBox:`0 0 26 18`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[_jsx(`line`,{x1:`2`,y1:`9`,x2:`22`,y2:`9`}),_jsx(`polyline`,{points:`16,3 22,9 16,15`})]}),_jsx(`span`,{children:`write`})]}),_jsxs(`div`,{className:`sm-node `+locClass,children:[_jsx(`div`,{className:`sm-node-l`,children:t.loc}),_jsx(`div`,{className:`sm-node-v`,children:cur.locTag})]})]}),_jsxs(`div`,{className:`sm-body`,children:[_jsxs(`div`,{className:`sm-specs`,children:[_jsxs(`div`,{className:`sm-row`,children:[_jsx(`div`,{className:`sm-k`,children:t.loc}),_jsx(`div`,{className:`sm-v`,children:cur.loc})]}),_jsxs(`div`,{className:`sm-row`,children:[_jsx(`div`,{className:`sm-k`,children:t.survive}),_jsx(`div`,{className:`sm-v`,children:_jsx(Pill,{ok:cur.survive})})]}),_jsxs(`div`,{className:`sm-row`,children:[_jsx(`div`,{className:`sm-k`,children:t.share}),_jsx(`div`,{className:`sm-v`,children:_jsx(Pill,{ok:cur.share})})]}),_jsxs(`div`,{className:`sm-row`,children:[_jsx(`div`,{className:`sm-k`,children:t.perf}),_jsx(`div`,{className:`sm-v`,children:cur.perf})]}),_jsxs(`div`,{className:`sm-row`,children:[_jsx(`div`,{className:`sm-k`,children:t.use}),_jsx(`div`,{className:`sm-v`,children:cur.use})]})]}),_jsx(`div`,{className:`sm-note`,children:cur.note})]})]})};function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Docker`}),` `,_jsx(_components.code,{children:`Volume`}),` `,_jsx(_components.code,{children:`bind mount`})]}),`\n`,_jsx(_components.p,{children:`Delete a container and whatever you wrote into its writable layer is gone. To keep data, put it outside the container. This page makes the four destinations clear. Toggle the four modes below to see where data actually lands and whether it survives deletion:`}),`\n`,_jsx(_MdxComponentBoundary,{name:`StorageMounts`,children:_jsx(StorageMounts,{lang:`en`})}),`\n`,_jsx(Heading,{level:`2`,id:`without-a-mount-data-is-in-the-container-writable-layer`,children:`Without a mount, data is in the container writable layer`}),`\n`,_jsxs(_components.p,{children:[`A container has a writable layer on top of the read-only image layers. Without a mount, files you write land there, using `,_jsx(_components.strong,{children:`copy-on-write`}),` (CoW): editing an existing file copies the `,_jsx(_components.strong,{children:`whole file`}),` from the read-only layer up to the writable layer first, then edits the copy.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Changing one byte of a 1 GB file still copies the whole file first, so `,_jsx(_components.strong,{children:`write-heavy work is noticeably slow`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`The writable layer follows the container lifecycle; `,_jsx(_components.code,{children:`docker rm`}),` wipes it all.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`So databases, data you need to keep, and high-I/O workloads should never live only in the writable layer.`}),`\n`,_jsx(Heading,{level:`2`,id:`comparing-the-three-mount-types`,children:`Comparing the three mount types`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Dimension`}),_jsx(_components.th,{children:`Volume`}),_jsx(_components.th,{children:`Bind mount`}),_jsx(_components.th,{children:`tmpfs`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Definition`}),_jsx(_components.td,{children:`Docker-managed named storage`}),_jsx(_components.td,{children:`A host path mapped into the container`}),_jsx(_components.td,{children:`Stored in host memory, never on disk`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Where data lives`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/var/lib/docker/volumes/\u003cname>/_data`})}),_jsx(_components.td,{children:`A host path you specify`}),_jsx(_components.td,{children:`Host RAM`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Survives container rm?`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Yes (on the host)`}),_jsx(_components.td,{children:`No`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Shareable across containers`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`No`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Performance (Linux)`}),_jsx(_components.td,{children:`Same as native host FS`}),_jsx(_components.td,{children:`Same as native`}),_jsx(_components.td,{children:`Fastest (RAM I/O)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Best for`}),_jsx(_components.td,{children:`Databases, persistent data, backup/migration`}),_jsx(_components.td,{children:`Dev source sync, config injection`}),_jsx(_components.td,{children:`Secrets, scratch cache (Linux only)`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`a-named-volume’s-physical-location`,children:`A named volume’s physical location`}),`\n`,_jsx(_components.p,{children:`On Linux:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` volume`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` inspect`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` my-vol`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# \"Mountpoint\": \"/var/lib/docker/volumes/my-vol/_data\"`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Under the WSL 2 backend, that path is inside the `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`docker-desktop-data`})}),` WSL VM, `,_jsx(_components.strong,{children:`not on the Windows filesystem`}),`, so you cannot browse into it from File Explorer. To read volume contents:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --rm`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -v`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` my-vol:/data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` alpine`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ls`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /data`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # mount it into a container to look`})]}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`2`,id:`bind-mount-v-vs-mount`,children:[`bind mount: `,_jsx(_components.code,{children:`-v`}),` vs `,_jsx(_components.code,{children:`--mount`})]}),`\n`,_jsxs(_components.p,{children:[`Two syntaxes for the same thing, but `,_jsx(_components.code,{children:`--mount`}),` is explicit and officially preferred:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# -v: short, but ambiguous`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -v`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /host/data:/app/data:ro`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` app`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# --mount: explicit type, no ambiguity`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --mount`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` type=bind,source=/host/data,target=/app/data,readonly`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` app`})]}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Behavior`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`--mount type=bind`})}),_jsx(_components.th,{children:_jsx(_components.code,{children:`-v`})})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Host path missing`}),_jsx(_components.td,{children:`Errors, refuses`}),_jsx(_components.td,{children:`Creates an empty directory`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Relative path (`,_jsx(_components.code,{children:`./data`}),`)`]}),_jsx(_components.td,{children:`Treated as a bind mount`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`May be treated as a named volume name`})})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`The `,_jsx(_components.code,{children:`-v`}),` relative-path trap`]}),`: `,_jsx(_components.code,{children:`-v mydata:/app/data`}),` (no leading slash) is treated as “create a named volume called `,_jsx(_components.code,{children:`mydata`}),`”, not a bind mount. To be sure it is a bind mount, use an absolute path or the explicit `,_jsx(_components.code,{children:`--mount type=bind`}),`.`]})}),`\n`,_jsxs(Heading,{level:`2`,id:`anonymous-volumes-and-the-dockerfile-volume-trap`,children:[`Anonymous volumes and the Dockerfile `,_jsx(_components.code,{children:`VOLUME`}),` trap`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`-v`}),` with only a container path and no name creates a random-UUID `,_jsx(_components.strong,{children:`anonymous volume`}),`. The Dockerfile `,_jsx(_components.code,{children:`VOLUME`}),` instruction also auto-creates an anonymous volume mounted at that path on `,_jsx(_components.code,{children:`docker run`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`docker`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`docker`,children:_jsxs(_components.code,{language:`docker`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` node:20`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WORKDIR`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /app`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`COPY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` . .`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`RUN`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` npm install # node_modules goes into the image layer`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`VOLUME`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /app # trap: at run time an anonymous volume mounts over /app, shadowing node_modules`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`At `,_jsx(_components.code,{children:`docker run`}),` an anonymous volume mounts over `,_jsx(_components.code,{children:`/app`}),`, `,_jsxs(_components.strong,{children:[`shadowing the `,_jsx(_components.code,{children:`node_modules`}),` the image layer installed`]}),`, and the app will not start. Fix: do not declare `,_jsx(_components.code,{children:`VOLUME`}),` on a path that gets shadowed, or skip `,_jsx(_components.code,{children:`VOLUME`}),` and mount explicitly at `,_jsx(_components.code,{children:`docker run`}),` / Compose.`]}),`\n`,_jsxs(_components.p,{children:[`A container deleted without `,_jsx(_components.code,{children:`--rm`}),` leaves a dangling anonymous volume; clear it with `,_jsx(_components.code,{children:`docker volume prune`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`docker-volume-commands`,children:`docker volume commands`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` volume`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` create`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` my-vol`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` volume`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ls`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` volume`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` inspect`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` my-vol`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # see the Mountpoint`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` volume`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` rm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` my-vol`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` volume`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` prune`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # clear unused volumes (anonymous only by default)`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`wsl-2-mount-performance-important`,children:`WSL 2 mount performance (important)`}),`\n`,_jsxs(_components.p,{children:[`High-I/O data (source code, `,_jsx(_components.code,{children:`node_modules`}),`, database files) should sit on the `,_jsx(_components.strong,{children:`WSL 2 Linux filesystem`}),` and be bind-mounted from there. `,_jsxs(_components.strong,{children:[`Do not mount from `,_jsx(_components.code,{children:`/mnt/c`}),` (Windows paths)`]}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -v`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ~/my-project:/sources`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` app`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # correct: WSL 2 Linux filesystem`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -v`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /mnt/c/Users/me/project:/sources`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` app`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # avoid: cross-OS boundary, slow`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Official guidance: bind mounts from the Windows filesystem are noticeably slower, and `,_jsx(_components.strong,{children:`inotify events only work on the Linux filesystem`}),`, so mounting `,_jsx(_components.code,{children:`/mnt/c`}),` breaks hot reload (Vite, webpack, nodemon) because file-change events never fire. For high-I/O cases, prefer named volumes or bind mounts originating on the WSL 2 Linux side.`]}),`\n`,_jsx(Heading,{level:`2`,id:`next`,children:`Next`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/en/notes/docker/guide/config/`,children:`Performance settings`}),`: checking and moving the `,_jsx(_components.code,{children:`docker-desktop-data`}),` VHDX.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/en/notes/docker/guide/compose/`,children:`Docker Compose`}),`: mounting volumes and bind mounts in compose.yaml.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Reference: `,_jsx(_components.a,{href:`https://docs.docker.com/engine/storage/`,children:`docs.docker.com/engine/storage`})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{StorageMounts,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Where Data Lives: volume, bind mount, tmpfs, and no mount","description":"Where container data lives and whether it survives deletion: writable layer, volume, bind mount, tmpfs, and WSL 2 mount performance.","tags":["Docker","Volume","Containers"],"gallery":false,"lastUpdated":"2026-06-10T00:00:00.000Z","og:image":"https://felimet-hub.jmcores.com/images/og/en/notes/docker/guide/storage.png","href":"/en/notes/docker/guide/storage"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[149,9158,")=>null;function _cr"]]},"mdxExtracts":{"tableOfContents":[{"title":"Without a mount, data is in the container writable layer","slug":"without-a-mount-data-is-in-the-container-writable-layer","depth":2,"children":[]},{"title":"Comparing the three mount types","slug":"comparing-the-three-mount-types","depth":2,"children":[]},{"title":"A named volume’s physical location","slug":"a-named-volume’s-physical-location","depth":2,"children":[]},{"title":"bind mount: -v vs --mount","slug":"bind-mount-v-vs-mount","depth":2,"children":[]},{"title":"Anonymous volumes and the Dockerfile VOLUME trap","slug":"anonymous-volumes-and-the-dockerfile-volume-trap","depth":2,"children":[]},{"title":"docker volume commands","slug":"docker-volume-commands","depth":2,"children":[]},{"title":"WSL 2 mount performance (important)","slug":"wsl-2-mount-performance-important","depth":2,"children":[]},{"title":"Next","slug":"next","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/felimet/6c798a0f4328f473/footer-copyright.js","/_mintlify/custom/felimet/533ce0be9d9eedf7/quotes-straight.js","/_mintlify/custom/felimet/f5e5cc3987f8f18a/fonts-noto-serif.js"],"subdomain":"felimet","siteName":"Felimet Hub","title":"Where Data Lives: volume, bind mount, tmpfs, and no mount - Felimet Hub","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"zh-Hant":{"href":"/notes/docker/guide/storage","matchLevel":1},"en":{"href":"/en/notes/docker/guide/storage","matchLevel":0}}},"lastModified":"2026-06-10T08:30:20.084Z","originalFileLocation":"en/notes/docker/guide/storage.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Where container data lives and whether it survives deletion: writable layer, volume, bind mount, tmpfs, and WSL 2 mount performance.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Felimet Hub\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/felimet/VP-mssWVnCo26pAx/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/felimet/VP-mssWVnCo26pAx/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/felimet/VP-mssWVnCo26pAx/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/felimet/VP-mssWVnCo26pAx/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/felimet/VP-mssWVnCo26pAx/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/felimet/VP-mssWVnCo26pAx/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/felimet/VP-mssWVnCo26pAx/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/felimet/VP-mssWVnCo26pAx/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/felimet/VP-mssWVnCo26pAx/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Where Data Lives: volume, bind mount, tmpfs, and no mount - Felimet Hub\">\u003cmeta data-mint-head property=\"og:description\" content=\"Where container data lives and whether it survives deletion: writable layer, volume, bind mount, tmpfs, and WSL 2 mount performance.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Felimet Hub\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://felimet-hub.jmcores.com/en/notes/docker/guide/storage\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://felimet-hub.jmcores.com/images/og/en/notes/docker/guide/storage.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Where Data Lives: volume, bind mount, tmpfs, and no mount - Felimet Hub\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Where container data lives and whether it survives deletion: writable layer, volume, bind mount, tmpfs, and WSL 2 mount performance.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://felimet-hub.jmcores.com/images/og/en/notes/docker/guide/storage.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/felimet/VP-mssWVnCo26pAx/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Felimet Hub\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#bf7551\">\u003cmeta data-mint-head name=\"og:locale\" content=\"zh_TW\">\u003cmeta data-mint-head name=\"theme-color\" content=\"#bf7551\">\u003clink data-mint-head rel=\"canonical\" href=\"https://felimet-hub.jmcores.com/en/notes/docker/guide/storage\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/notes/docker/guide/storage.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://felimet-hub.jmcores.com/en/notes/docker/guide/storage\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hant\" href=\"https://felimet-hub.jmcores.com/notes/docker/guide/storage\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://felimet-hub.jmcores.com/notes/docker/guide/storage\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://felimet-hub.jmcores.com/#organization\",\"name\":\"Felimet Hub\",\"url\":\"https://felimet-hub.jmcores.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/felimet/o4nUK2uwNPSF27VA/images/logo-wordmark.svg?fit=max\u0026auto=format\u0026n=o4nUK2uwNPSF27VA\u0026q=85\u0026s=fdb2230ec10839b256cde63a087a0770\"}},{\"@type\":\"WebSite\",\"@id\":\"https://felimet-hub.jmcores.com#website\",\"name\":\"Felimet Hub\",\"url\":\"https://felimet-hub.jmcores.com\",\"publisher\":{\"@id\":\"https://felimet-hub.jmcores.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://felimet-hub.jmcores.com/en/notes/docker/guide/storage#webpage\",\"url\":\"https://felimet-hub.jmcores.com/en/notes/docker/guide/storage\",\"name\":\"Where Data Lives: volume, bind mount, tmpfs, and no mount\",\"description\":\"Where container data lives and whether it survives deletion: writable layer, volume, bind mount, tmpfs, and WSL 2 mount performance.\",\"dateModified\":\"2026-06-10T08:30:20.084Z\",\"isPartOf\":{\"@id\":\"https://felimet-hub.jmcores.com#website\"},\"breadcrumb\":{\"@id\":\"https://felimet-hub.jmcores.com/en/notes/docker/guide/storage#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://felimet-hub.jmcores.com/en/notes/docker/guide/storage#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Docker\",\"item\":\"https://felimet-hub.jmcores.com/en/notes/docker/install-windows\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Usage \u0026 Config\",\"item\":\"https://felimet-hub.jmcores.com/en/notes/docker/guide/concepts\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Where Data Lives: volume, bind mount, tmpfs, and no mount\",\"item\":\"https://felimet-hub.jmcores.com/en/notes/docker/guide/storage\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://felimet-hub.jmcores.com/en/notes/docker/guide/storage#article\",\"headline\":\"Where Data Lives: volume, bind mount, tmpfs, and no mount\",\"name\":\"Where Data Lives: volume, bind mount, tmpfs, and no mount\",\"description\":\"Where container data lives and whether it survives deletion: writable layer, volume, bind mount, tmpfs, and WSL 2 mount performance.\",\"url\":\"https://felimet-hub.jmcores.com/en/notes/docker/guide/storage\",\"mainEntityOfPage\":{\"@id\":\"https://felimet-hub.jmcores.com/en/notes/docker/guide/storage#webpage\"},\"image\":\"https://felimet-hub.jmcores.com/images/og/en/notes/docker/guide/storage.png\",\"dateModified\":\"2026-06-10T08:30:20.084Z\",\"publisher\":{\"@id\":\"https://felimet-hub.jmcores.com/#organization\"},\"isPartOf\":{\"@id\":\"https://felimet-hub.jmcores.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Felimet Hub\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Felimet Hub","nav":{"global":null,"languages":[{"language":"zh-Hant","pages":[{"title":"zh-Hant","href":"/notes/docker/guide/storage"}]},{"language":"en","tabs":[{"tab":"Projects","icon":"folder-open","pages":[{"title":"Projects","href":"/en/projects/overview"}]},{"tab":"Notes","icon":"book","groups":[{"group":"Overview","pages":[{"title":"Technical notes: environment setup, networking, and writing","href":"/en/notes/overview"}]},{"group":"AI Models \u0026 Algorithms","pages":[{"title":"Windows CUDA \u0026 cuDNN Development Environment Setup Guide","href":"/en/notes/ai-core/environment/cuda-setup"},{"title":"WSL2 CUDA Toolkit Installation Guide","href":"/en/notes/ai-core/environment/wsl-cuda-setup"}]},{"group":"Docker","pages":[{"title":"Installing Docker on Windows (WSL 2 backend)","href":"/en/notes/docker/install-windows"},{"group":"Usage \u0026 Config","pages":[{"title":"Docker Core Concepts and Two Interfaces","href":"/en/notes/docker/guide/concepts"},{"title":"Common Docker CLI Commands","href":"/en/notes/docker/guide/cli"},{"title":"Docker Hub and Image Sources","href":"/en/notes/docker/guide/hub"},{"title":"Docker Performance Settings (WSL 2 backend and the daemon)","description":"How the WSL 2 backend allocates CPU and memory (.wslconfig), WSL integration commands, where Docker data lives, and daemon.json.","href":"/en/notes/docker/guide/config"},{"title":"Where Data Lives: volume, bind mount, tmpfs, and no mount","href":"/en/notes/docker/guide/storage"},{"title":"Docker Compose","description":"Declare a multi-container app in one compose.yaml: services, networks, project name, env vars, GPUs, performance, volume mapping, and the docker compose CLI.","href":"/en/notes/docker/guide/compose"}]},{"group":"Dockerfile","pages":[{"title":"What a Dockerfile Is and Building from Scratch","href":"/en/notes/docker/dockerfile/basics"},{"title":"Dockerfile Instructions One by One","href":"/en/notes/docker/dockerfile/instructions"},{"title":"A Python App Dockerfile","href":"/en/notes/docker/dockerfile/python"},{"title":"Choosing a Prebuilt Image","href":"/en/notes/docker/dockerfile/images"},{"title":"Layer Cache and Best Practices","href":"/en/notes/docker/dockerfile/caching"}]}]},{"group":"Software \u0026 Tools","pages":[{"title":"Conda Installation and Configuration Guide","href":"/en/notes/software/languages/python/conda-guide"},{"title":"WSL Ubuntu System Migration Guide","href":"/en/notes/software/wsl-ubuntu-migration"}]},{"group":"Knowledge \u0026 Method","pages":[{"title":"Technical Writing Guide \u0026 Document Quality Standards","href":"/en/notes/knowledge/writing-skills/zhtw-writing"}]},{"group":"Networking \u0026 Self-hosting","pages":[{"title":"Synology NAS OpenVPN Server Setup Guide","href":"/en/notes/network/synology-openvpn"},{"title":"Windows 11 Multi-User Remote Desktop (RDP) Setup","href":"/en/notes/network/windows-multi-rdp"}]}]},{"tab":"Code Agent","icon":"bot","pages":[{"title":"Code Agent","href":"/en/code-agent/overview"}]},{"tab":"Research","icon":"flask-conical","pages":[{"title":"Research","href":"/en/research/overview"}]},{"tab":"Publications","icon":"graduation-cap","pages":[{"title":"Publications","href":"/en/publications/overview"}]},{"tab":"About","icon":"user","pages":[{"title":"About","href":"/en/about"}]}]}]},"title":"Where Data Lives: volume, bind mount, tmpfs, and no mount - Felimet Hub","buildId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","deploymentId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","dynamics":[],"chunks":[]}