Docker 数据管理
文章目录
Use tmpfs mounts
Volumes and bind mounts are mounted into the container’s filesystem by default, and their contents are stored on the host machine.
There may be cases where you do not want to store a container’s data on the host machine, but you also don’t want to write the data into the container’s writable layer, for performance or security reasons, or if the data relates to non-persistent application state. An example might be a temporary one-time password that the container’s application creates and uses as-needed.

用法:
root@ubuntu:~# docker run -d --name tmptest --mount type=tmpfs,destination=/app,tmpfs-size=100M nginx
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论