Skip to main content

What issues arise when storing logs inside container filesystem instead of stdout/stderr?

Mid Docker
Quick Answer Storing logs in the container filesystem fills the container's writable layer รขโ‚ฌโ€ you can't easily ship them, rotate them, or query them from outside. Logging to stdout/stderr lets Docker capture them via the log driver and forward to systems like CloudWatch, ELK, or Splunk. Containers should be observable, not self-archiving.

Answer

Logs fill the writable layer, degrade performance, and are lost when containers are deleted.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice