Interview Prep/Docker/Storage, volumes and disk space

Bind mount of a single file shows stale content after editing it on host.

IntermediateTroubleshootingStorage, volumes and disk space
Answer

Likely causes → Editor replaced the file (new inode) so the container still sees the old inode.

Diagnose → stat -c %i file before/after save; docker exec c cat file.

Fix → Mount the parent directory, or restart the container, or edit in place (cat > file).

Prevent → Mount directories rather than single files.

All Docker questions Roadmap: Docker & containers

More on Storage, volumes and disk space