Skip to main content

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

  1. Select the operation scenario
  2. Fill in the parameters
  3. Copy the generated command

Supported Scenarios

ScenarioDescription
runRun a new container
execExecute command in running container
logsView container logs
psList containers
imagesList images
buildBuild image
pull/pushPull/Push image
stop/rm/rmiStop/Remove container/image
composeDocker Compose operations
pruneClean up unused resources
networkNetwork management
volumeVolume 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