Overview
Dockhand’s file browser provides a web-based interface for managing files inside running containers and Docker volumes. Browse directories, edit files, upload/download content, and manage permissions without shell access.Container File Browser
Browsing Container Files
Access the filesystem of any running container:Implementation
File Operations
Reading File Content
Read the contents of a text file:Writing File Content
Update or create a file:File Size Limits
Creating Files/Directories
Deleting Files
Renaming Files
Changing Permissions
File Upload/Download
Uploading Files
Upload one or more files to a container:Downloading Files
Content-Disposition header.
Volume File Browser
Browsing Volume Files
Browse files in a Docker volume:Volume Browser Implementation
Volumes are accessed through temporary helper containers:Helper Container Lifecycle
- On first browse request: Create a temporary container with volume mounted
- Subsequent requests: Reuse the same container (cached for 30 minutes)
- Automatic cleanup: Helper containers are removed after TTL expires
- Manual cleanup: Helper containers can be released immediately
Release Helper Container
File Editor Integration
The frontend integrates a code editor (Monaco/CodeMirror) for editing files:Supported File Types
- Configuration: JSON, YAML, TOML, INI
- Code: JavaScript, TypeScript, Python, Go, Rust, Java
- Markup: HTML, XML, Markdown
- Styles: CSS, SCSS, LESS
- Shell: Bash, Zsh, Shell scripts
- Logs: Plain text with syntax highlighting
Editor Features
- Syntax highlighting
- Auto-completion
- Line numbers
- Search and replace
- Multiple cursor support
- Bracket matching
- Code folding
- Diff view (compare with previous version)
Security Considerations
Permission Requirements
Container Requirements
File operations only work on running containers:Read-Only Volumes
Volumes mounted read-only cannot be modified:Common Use Cases
Editing Configuration
- Navigate to container’s config directory
- Open configuration file
- Edit in web-based editor
- Save changes
- Restart container if needed
Viewing Logs
- Browse to log directory
- Open log file
- Search for errors or patterns
- Download for local analysis
Uploading Certificates
- Navigate to certificate directory (e.g.,
/etc/ssl/certs) - Upload new certificate files
- Set appropriate permissions (644 for certs, 600 for keys)
- Reload or restart service
Backup Configuration
- Browse to application directory
- Download configuration files
- Store locally or in version control
- Restore by uploading when needed
Debugging
- Check application files for corruption
- Verify configuration syntax
- Inspect generated files
- Compare with known good versions
Best Practices
File Operations
- Always backup before making changes
- Test changes in non-production first
- Use version control for configuration files
- Set proper permissions after uploads
- Validate syntax before saving configs
Volume Management
- Release helper containers when done browsing
- Use read-only mode for volumes in use
- Avoid large file operations (>100MB) through browser
- Download volumes for backup instead of browsing
Security
- Limit file browser access to authorized users
- Audit file changes through activity logs
- Never edit files containing secrets through browser
- Use proper file permissions (644 for files, 755 for scripts)
- Rotate secrets after viewing in file browser
Limitations
File Size Limits
- Reading: 1MB maximum for text files
- Uploading: Limited by browser and server settings
- Editing: Large files may cause browser performance issues
Container State
- Requires running containers
- Cannot access stopped containers
- Cannot access containers without shell
File System Support
- Works with standard Linux filesystems
- May have issues with special filesystems (proc, sys, dev)
- Binary files display as download only
Troubleshooting
Permission Denied
- Check container user permissions
- Use
chmodendpoint to fix permissions - Exec into container as root if needed
Container Not Running
File Too Large
- Download file for local editing
- Use terminal/exec for large file operations
- Split file into smaller chunks
Volume Browse Timeout
- Check if volume exists
- Release and retry helper container
- Verify volume is not corrupted
