folkzone:troubleshooting:docker_file_mounting_issues
This is an old revision of the document!
Table of Contents
Docker File Mounting Issues
Container fails to start with file mounting errors.
Symptom
Container fails to start with “not a directory” errors. Files being mounted as directories instead of files. Configuration files not being read correctly.
Cause
Source files are directories instead of regular files when mounting in Docker.
Fix
Steps:
1. Check file type: `ls -la ~/server/irc/` 2. Remove incorrectly created directories: `sudo rm -rf ~/server/irc/config.yml` (if it's a directory) 3. Copy correct file: `cp correct/path/config.yml ~/server/irc/config.yml` 4. Verify file is regular file: `file ~/server/irc/config.yml` 5. Restart container: `docker compose up -d service-name`
Prevention
Always verify file types before mounting. Use `file` command to check if a path is a file or directory.
See Also
folkzone/troubleshooting/docker_file_mounting_issues.1791373050.txt.gz · Last modified: by 127.0.0.1
