Tasuta konverter

Dockeri käsud Petuleht

Põhjalik Dockeri käskude petuleht. Otsige 70+ olulisest Dockeri käsust koos näidete, kirjelduste ja ühe klõpsuga koopiaga.

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

Sellest tööriistast

Põhjalik kiirjuhend dokkimiskäskude kohta. Sirvige sagedamini kasutatavaid käske, süntaksit ja näiteid kategooriate kaupa. Otsitav ja mobiilisõbralik – lisage see leht järjehoidjatesse, et pääseda kohe juurde, kui vajate kiiret meeldetuletust.

Kuidas kasutada

  1. Sirvige kategoriseeritud viiteosasid.
  2. Kasutage konkreetsete käskude või süntaksi leidmiseks otsinguriba.
  3. Kasutamisnäidete ja selgituste vaatamiseks klõpsake mis tahes kirjel.
  4. Kopeerige käsud otse terminalis või redaktoris kasutamiseks.

Korduma kippuvad küsimused

Kas see viide on ajakohane?
Viide hõlmab laialdaselt kasutatavaid käske ja süntaksit, mis on versioonide lõikes stabiilsed. Viimaste täienduste või versioonipõhiste funktsioonide vaatamiseks vaadake ametlikku dokumentatsiooni.
Kas ma saan seda võrguühenduseta kasutada?
Pärast laadimist töötab leht ilma Interneti-ühenduseta. Lisage see kiireks juurdepääsuks järjehoidjatesse – kogu sisu renderdatakse brauseris ilma täiendavate võrgupäringuteta.
Kas see on kõikehõlmav või ainult põhitõed?
See hõlmab kõige sagedamini kasutatavaid käske ja mustreid, mis täidavad 90% igapäevastest ülesannetest. Niši- või täiustatud funktsioonide kohta vaadake ametlikku dokumentatsiooni.
Kas ma saan soovitada täiendusi?
Uuendame regulaarselt oma viiteid. Kui märkate puuduvaid käske või teil on soovitusi, andke meile sellest meie kontaktide lehe kaudu teada.