目录挂载

2022-06-05  本文已影响0人  林立镇

🥙目录挂载

<article class="markdown-body" style="margin: 0px; padding: 0px; box-sizing: border-box; text-size-adjust: 100%; overflow-wrap: break-word; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 15px; line-height: 1.7; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">

现存问题

目录挂载解决以上问题

本文档课件配套 视频教程

几种挂载方式

文档参考:https://docs.docker.com/storage/

[图片上传失败...(image-ab3ca7-1654046831917)]

挂载演示

bind mount 方式用绝对路径 -v D:/code:/app

volume 方式,只需要一个名字 -v db-data:/app

示例:
docker run -p 8080:8080 --name test-hello -v D:/code:/app -d test:v1

</article>

转载自
Docker 快速入门

上一篇 下一篇

猜你喜欢

热点阅读