แปลงฟรี

คำสั่งนักเทียบท่า แผ่นโกง

แผ่นโกงคำสั่ง Docker ที่ครอบคลุม ค้นหาคำสั่ง Docker ที่จำเป็นมากกว่า 70 รายการพร้อมตัวอย่าง คำอธิบาย และการคัดลอกในคลิกเดียว

docker run
Create and start a new container from an image
ตัวอย่าง:docker run -d -p 80:80 --name web nginx
docker run -it
Run a container interactively with a terminal
ตัวอย่าง:docker run -it ubuntu bash
docker run --rm
Run a container and remove it automatically when it exits
ตัวอย่าง:docker run --rm alpine echo 'hello'
docker run -e
Set environment variables in a container
ตัวอย่าง:docker run -e NODE_ENV=production node:18
docker run -v
Mount a volume or bind mount into a container
ตัวอย่าง:docker run -v /host/path:/container/path nginx
docker start
Start one or more stopped containers
ตัวอย่าง:docker start my-container
docker stop
Stop one or more running containers gracefully
ตัวอย่าง:docker stop my-container
docker restart
Restart one or more containers
ตัวอย่าง:docker restart my-container
docker rm
Remove one or more stopped containers
ตัวอย่าง:docker rm my-container
docker rm -f
Force-remove a running container
ตัวอย่าง:docker rm -f my-container
docker ps
List running containers
ตัวอย่าง:docker ps
docker ps -a
List all containers including stopped ones
ตัวอย่าง:docker ps -a
docker exec
Run a command in a running container
ตัวอย่าง:docker exec -it my-container bash
docker logs
Fetch logs from a container
ตัวอย่าง:docker logs -f --tail 100 my-container
docker inspect
Return low-level information about a container or image
ตัวอย่าง:docker inspect my-container
docker stats
Display live resource usage statistics for containers
ตัวอย่าง:docker stats my-container
docker top
Display running processes inside a container
ตัวอย่าง:docker top my-container
docker pause
Pause all processes within a container
ตัวอย่าง:docker pause my-container
docker unpause
Unpause all processes within a paused container
ตัวอย่าง:docker unpause my-container
docker rename
Rename an existing container
ตัวอย่าง:docker rename old-name new-name
docker kill
Kill a running container by sending a signal
ตัวอย่าง:docker kill --signal=SIGTERM my-container
docker cp
Copy files between a container and the host filesystem
ตัวอย่าง:docker cp my-container:/app/config.json ./config.json
docker attach
Attach local I/O streams to a running container
ตัวอย่าง:docker attach my-container
docker pull
Download an image from a registry
ตัวอย่าง:docker pull nginx:latest
docker push
Upload an image to a registry
ตัวอย่าง:docker push myuser/myimage:v1.0
docker build
Build an image from a Dockerfile
ตัวอย่าง:docker build -t myapp:latest .
docker build --no-cache
Build an image without using the layer cache
ตัวอย่าง:docker build --no-cache -t myapp:latest .
docker images
List all locally available images
ตัวอย่าง:docker images
docker rmi
Remove one or more images
ตัวอย่าง:docker rmi nginx:old myimage:v1
docker tag
Create a tag referencing a source image
ตัวอย่าง:docker tag myapp:latest myuser/myapp:v2.0
docker history
Show the history of an image's layers
ตัวอย่าง:docker history nginx:latest
docker save
Save an image to a tar archive
ตัวอย่าง:docker save -o myimage.tar myapp:latest
docker load
Load an image from a tar archive
ตัวอย่าง:docker load -i myimage.tar
docker import
Import a tarball to create a filesystem image
ตัวอย่าง:docker import mycontainer.tar myimage:imported
docker export
Export a container's filesystem as a tar archive
ตัวอย่าง:docker export my-container > mycontainer.tar
docker commit
Create a new image from a container's changes
ตัวอย่าง:docker commit my-container myimage:snapshot
docker image prune
Remove unused (dangling) images
ตัวอย่าง:docker image prune -a
docker network create
Create a new network
ตัวอย่าง:docker network create --driver bridge my-network
docker network ls
List all networks
ตัวอย่าง:docker network ls
docker network rm
Remove one or more networks
ตัวอย่าง:docker network rm my-network
docker network inspect
Show detailed information about a network
ตัวอย่าง:docker network inspect my-network
docker network connect
Connect a running container to a network
ตัวอย่าง:docker network connect my-network my-container
docker network disconnect
Disconnect a container from a network
ตัวอย่าง:docker network disconnect my-network my-container
docker network prune
Remove all unused networks
ตัวอย่าง:docker network prune
docker volume create
Create a named volume
ตัวอย่าง:docker volume create my-volume
docker volume ls
List all volumes
ตัวอย่าง:docker volume ls
docker volume rm
Remove one or more volumes
ตัวอย่าง:docker volume rm my-volume
docker volume inspect
Display detailed information about a volume
ตัวอย่าง:docker volume inspect my-volume
docker volume prune
Remove all unused local volumes
ตัวอย่าง:docker volume prune
docker compose up
Create and start all services defined in compose file
ตัวอย่าง:docker compose up -d
docker compose down
Stop and remove containers, networks from compose
ตัวอย่าง:docker compose down --volumes
docker compose ps
List containers for a compose project
ตัวอย่าง:docker compose ps
docker compose logs
View output from compose service containers
ตัวอย่าง:docker compose logs -f web
docker compose build
Build or rebuild services defined in compose file
ตัวอย่าง:docker compose build --no-cache web
docker compose pull
Pull service images defined in the compose file
ตัวอย่าง:docker compose pull
docker compose restart
Restart service containers
ตัวอย่าง:docker compose restart web
docker compose exec
Execute a command in a running service container
ตัวอย่าง:docker compose exec web bash
docker compose run
Run a one-off command on a service
ตัวอย่าง:docker compose run --rm web npm test
docker compose stop
Stop running containers without removing them
ตัวอย่าง:docker compose stop web
docker compose config
Validate and view the merged compose configuration
ตัวอย่าง:docker compose config
docker info
Display system-wide Docker information
ตัวอย่าง:docker info
docker version
Show the Docker client and daemon version
ตัวอย่าง:docker version
docker system df
Show disk usage by Docker objects
ตัวอย่าง:docker system df -v
docker system prune
Remove all unused Docker resources at once
ตัวอย่าง:docker system prune -a --volumes
docker events
Stream real-time events from the Docker daemon
ตัวอย่าง:docker events --filter type=container
docker login
Log in to a Docker registry
ตัวอย่าง:docker login registry.example.com
docker logout
Log out from a Docker registry
ตัวอย่าง:docker logout registry.example.com
docker search
Search Docker Hub for images
ตัวอย่าง:docker search --filter stars=100 nginx
docker context ls
List available Docker contexts
ตัวอย่าง:docker context ls
docker context use
Switch the active Docker context
ตัวอย่าง:docker context use my-remote-host

เกี่ยวกับเครื่องมือนี้

คู่มืออ้างอิงฉบับย่อที่ครอบคลุมสำหรับคำสั่งนักเทียบท่า เรียกดูคำสั่ง ไวยากรณ์ และตัวอย่างที่ใช้กันทั่วไปโดยจัดเรียงตามหมวดหมู่ ค้นหาได้และเหมาะกับมือถือ — บุ๊กมาร์กหน้านี้เพื่อการเข้าถึงได้ทันทีเมื่อคุณต้องการการแจ้งเตือนอย่างรวดเร็ว

วิธีใช้งาน

  1. เรียกดูส่วนอ้างอิงที่จัดหมวดหมู่
  2. ใช้แถบค้นหาเพื่อค้นหาคำสั่งหรือไวยากรณ์เฉพาะ
  3. คลิกที่รายการใดๆ เพื่อดูตัวอย่างการใช้งานและคำอธิบาย
  4. คัดลอกคำสั่งโดยตรงเพื่อใช้ในเทอร์มินัลหรือโปรแกรมแก้ไขของคุณ

คำถามที่พบบ่อย

การอ้างอิงนี้เป็นข้อมูลล่าสุดหรือไม่
ข้อมูลอ้างอิงครอบคลุมคำสั่งและไวยากรณ์ที่ใช้กันอย่างแพร่หลายซึ่งมีความเสถียรในเวอร์ชันต่างๆ หากต้องการทราบคุณสมบัติเพิ่มเติมหรือคุณลักษณะเฉพาะเวอร์ชันล่าสุด โปรดตรวจสอบเอกสารประกอบอย่างเป็นทางการ
ฉันสามารถใช้แบบออฟไลน์ได้หรือไม่?
เมื่อโหลดแล้ว หน้าเว็บจะทำงานได้โดยไม่ต้องเชื่อมต่ออินเทอร์เน็ต บุ๊กมาร์กไว้เพื่อการเข้าถึงที่รวดเร็ว — เนื้อหาทั้งหมดแสดงผลในเบราว์เซอร์โดยไม่ต้องร้องขอเครือข่ายเพิ่มเติม
เรื่องนี้ครอบคลุมหรือแค่พื้นฐาน?
ครอบคลุมคำสั่งและรูปแบบที่ใช้บ่อยที่สุดซึ่งจัดการ 90% ของงานประจำวัน สำหรับคุณสมบัติเฉพาะหรือขั้นสูง โปรดดูเอกสารอย่างเป็นทางการ
ฉันสามารถแนะนำเพิ่มเติมได้หรือไม่?
เราอัปเดตข้อมูลอ้างอิงของเราเป็นประจำ หากคุณสังเกตเห็นคำสั่งที่หายไปหรือมีข้อเสนอแนะ โปรดแจ้งให้เราทราบผ่านหน้าติดต่อของเรา