Ingyenes konverter

Docker parancsok Cheat Sheet

Átfogó Docker parancs csalólap. Keressen több mint 70 alapvető Docker-parancsban példákkal, leírásokkal és egy kattintásos másolattal.

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

Az eszközről

Átfogó gyorsreferencia útmutató a docker parancsokhoz. Böngésszen a gyakran használt parancsok, szintaxis és példák között kategóriák szerint rendezve. Kereshető és mobilbarát – vegye fel ezt az oldalt a könyvjelzők közé, hogy azonnal hozzáférhessen, ha gyors emlékeztetőre van szüksége.

Használati útmutató

  1. Böngésszen a kategorizált referenciarészek között.
  2. A keresősáv segítségével konkrét parancsokat vagy szintaxist kereshet.
  3. Kattintson bármelyik bejegyzésre a használati példák és magyarázatok megtekintéséhez.
  4. Másolja a parancsokat közvetlenül a terminálban vagy a szerkesztőben való használatra.

Gyakran ismételt kérdések

Ez a hivatkozás naprakész?
A hivatkozás kiterjed a széles körben használt parancsokra és szintaxisra, amelyek változatok között stabilak. A legújabb kiegészítésekért vagy verzióspecifikus szolgáltatásokért tekintse meg a hivatalos dokumentációt.
Használhatom ezt offline módban?
Betöltés után az oldal internetkapcsolat nélkül is működik. Vegye fel a könyvjelzők közé a gyors eléréshez – minden tartalom a böngészőben jelenik meg további hálózati kérések nélkül.
Ez átfogó vagy csak az alapok?
Lefedi a leggyakrabban használt parancsokat és mintákat, amelyek a mindennapi feladatok 90%-át kezelik. A rést vagy speciális funkciókat a hivatalos dokumentációban találja.
Javasolhatok kiegészítéseket?
Referenciáinkat rendszeresen frissítjük. Ha hiányzó parancsokat észlel, vagy javaslatai vannak, tudassa velünk kapcsolatfelvételi oldalunkon keresztül.