Docker Command Generator
Select Scenario
Image Name
Container Name
Port Mapping (-p)💡 输入后按回车键或点击 + 按钮添加
⏎
Volume Mounting (-v)💡 输入后按回车键或点击 + 按钮添加
⏎
Environment Variables (-e)💡 输入后按回车键或点击 + 按钮添加
⏎
Network
Restart Policy
-d (Run in background)
-i (Interactive mode)
-t (Allocate TTY)
--rm (Remove on exit)
Command
Generated Command
Instructions
- Select the operation scenario
- Fill in the parameters
- Copy the generated command
Supported Scenarios
| Scenario | Description |
|---|---|
| run | Run a new container |
| exec | Execute command in running container |
| logs | View container logs |
| ps | List containers |
| images | List images |
| build | Build image |
| pull/push | Pull/Push image |
| stop/rm/rmi | Stop/Remove container/image |
| compose | Docker Compose operations |
| prune | Clean up unused resources |
| network | Network management |
| volume | Volume management |
Common Examples
Run Nginx Container
docker run -d --name nginx -p 80:80 nginx:latest
Enter Container
docker exec -it container_name /bin/sh
View Logs
docker logs -f --tail 100 container_name
Docker Compose Start
docker compose -f docker-compose.yml up -d