English | 简体中文
Tired of containers without vim?
Tired of manually copying config files back and forth with docker cp?
vid makes it simple!
When working with Docker containers, we often face these frustrations:
- 🔧 No vim in containers: Many minimal container images don't include text editors to reduce size
- 📝 Editing configs is tedious: Have to manually
docker cpfiles out, edit them, then copy them back - ⏱️ Repetitive work: Every edit requires the copy → edit → copy back workflow
vid was created to solve these problems! It lets you edit files inside containers using your local vim editor, all with a single command.
- 🚀 One-command editing: Edit container files directly with a single command, no manual copying
- 💻 Use your local editor: Leverage your familiar vim configuration and plugins
- 🔄 Automated workflow: Automatically handles copying, editing, and writing back files
- 🧹 Auto cleanup: Automatically removes temporary files after editing
- 📊 Verbose logging: Use
-vflag to see detailed operation logs - ⚡ Lightweight & fast: Single binary, no additional dependencies
Download precompiled binaries for your platform from the Releases page.
wget https://github.com/E9C50/vid/releases/download/vX.X.X/vid-linux-amd64.tar.gz
tar -xzf vid-linux-amd64.tar.gz
sudo mv vid /usr/local/bin/
sudo chmod +x /usr/local/bin/vidwget https://github.com/E9C50/vid/releases/download/vX.X.X/vid-darwin-amd64.tar.gz
tar -xzf vid-darwin-amd64.tar.gz
sudo mv vid /usr/local/bin/
sudo chmod +x /usr/local/bin/vidDownload vid-windows-amd64.zip from the Releases page, extract it, and add vid.exe to your system PATH.
Requires Go 1.24 or later:
# Clone the repository
git clone https://github.com/E9C50/vid.git
cd vid
# Build
go build -o vid main.go
# Install to system path (optional)
sudo mv vid /usr/local/bin/go install github.com/E9C50/vid@latestvid <container_name_or_id> <file_path_in_container>-v- Enable verbose logging to see the full operation flow
# Edit nginx configuration file
vid my_nginx_container /etc/nginx/nginx.conf
# Edit application config file
vid web_app /app/config/app.conf
# Use verbose mode to see operation details
vid -v my_container /etc/config.json
# Use container ID
vid a1b2c3d4e5f6 /var/log/app.logTraditional approach (requires 3 commands):
docker cp my_container:/etc/nginx/nginx.conf ./nginx.conf
vim ./nginx.conf
docker cp ./nginx.conf my_container:/etc/nginx/nginx.conf
rm ./nginx.confUsing vid (only 1 command):
vid my_container /etc/nginx/nginx.conf┌─────────────────────────────────────────────────────────────┐
│ 1. Copy file from container to local temp file (docker cp) │
│ ↓ │
│ 2. Open temp file in local vim editor │
│ ↓ │
│ 3. Auto copy file back to container after save (docker cp) │
│ ↓ │
│ 4. Auto cleanup local temp file │
└─────────────────────────────────────────────────────────────┘
- Docker (installed and
dockercommand available) - vim editor (installed on local system)
- Access permissions to target container
- Ensure the Docker container is running
- Ensure the target file path exists in the container
- Ensure you have appropriate read/write permissions for the container and file
- Use the
-vflag to see detailed error information
Issues and Pull Requests are welcome!
This project is licensed under the MIT License.
If this project helps you, please give it a star ⭐
Built with ❤️ and Go