advancedTop 100 Interview Questions

When would you use a tmpfs mount instead of a volume?

When data must never persist to disk at all — for example, temporary secrets or sensitive scratch data — since tmpfs is backed entirely by host RAM and disappears the moment the container stops, with nothing ever written to a physical disk.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to What happens to an anonymous volume created implicitly by a Dockerfile's VOLUME instruction if you don't bind it explicitly?← Back to all Docker questions