Docker Command Quick Reference
DockerεΈΈη¨ε½δ»€ιζ₯葨οΌεΏ«ιζ₯ζΎεε€εΆ Docker ε½δ»€
docker run [OPTIONS] IMAGECreate and start a new container
docker run -d IMAGERun container in background
docker run --name NAME IMAGERun container with specified name
docker run -p HOST:CONTAINER IMAGERun container with port mapping
docker run -v HOST:CONTAINER IMAGERun container with volume mounting
docker run -e KEY=VALUE IMAGERun container with environment variables
docker run --rm IMAGEAutomatically remove container after exit
docker run -it IMAGE /bin/bashRun container interactively
docker psList running containers
docker ps -aList all containers (including stopped)
docker ps -qShow only container IDs
docker start CONTAINERStart a stopped container
docker stop CONTAINERStop a running container
docker restart CONTAINERRestart container
docker kill CONTAINERForce stop container
docker rm CONTAINERRemove stopped container
docker rm -f CONTAINERForce remove container (including running)
docker rm $(docker ps -aq)Remove all stopped containers
docker exec -it CONTAINER COMMANDExecute a command inside a running container
docker exec -it CONTAINER /bin/bashEnter the bash terminal of the container
docker logs CONTAINERView container logs
docker logs -f CONTAINERReal-time tracking of container logs
docker logs --tail 100 CONTAINERView the last 100 log lines
docker inspect CONTAINERView container details
docker top CONTAINERView processes running inside the container
docker statsDisplay container resource usage in real time
docker cp CONTAINER:SRC DESTCopy files from container to host
docker cp SRC CONTAINER:DESTCopy files from host to container
docker rename OLD NEWRename container
docker pause CONTAINERPause container
docker unpause CONTAINERResume paused container
docker wait CONTAINERWait for container to stop and return exit code
docker attach CONTAINERAttach to a running container
docker port CONTAINERView container port mapping
docker update --restart=always CONTAINERUpdate container configuration
docker imagesList local images
docker images -aList all images (including intermediate layers)
docker pull IMAGEPull image from repository
docker pull IMAGE:TAGPull image with specified tag
docker push IMAGEPush image to repository
docker rmi IMAGERemove image
docker rmi -f IMAGEForce remove image
docker rmi $(docker images -f dangling=true -q)Delete all dangling images
docker tag SOURCE TARGETCreate a new tag for an image
docker history IMAGEView image build history
docker inspect IMAGEView image details
docker save -o FILE.tar IMAGESave image as a tar file
docker load -i FILE.tarLoad image from a tar file
docker import FILE.tar IMAGEImport image from a tar file
docker export CONTAINER > FILE.tarExport container as a tar file
docker commit CONTAINER IMAGECreate a new image from a container
docker search TERMSearch for images on Docker Hub
docker image pruneRemove unused images
docker image prune -aRemove all unused images
docker volume lsList all volumes
docker volume create NAMECreate a volume
docker volume inspect NAMEView volume details
docker volume rm NAMERemove volume
docker volume pruneRemove all unused volumes
docker run --rm -v NAME:/data -v $(pwd):/backup alpine tar cvf /backup/backup.tar /dataBackup volume
docker run --rm -v NAME:/data -v $(pwd):/backup alpine tar xvf /backup/backup.tar -C /Restore volume
docker network lsList all networks
docker network create NAMECreate network
docker network create --driver bridge NAMECreate bridge network
docker network create --driver overlay NAMECreate overlay network
docker network inspect NAMEView network details
docker network rm NAMERemove network
docker network connect NETWORK CONTAINERConnect container to network
docker network disconnect NETWORK CONTAINERDisconnect container from network
docker network pruneRemove all unused networks
docker compose upCreate and start all services
docker compose up -dStart all services in background
docker compose up --buildBuild images and start services
docker compose downStop and remove all services
docker compose down -vStop services and remove data volumes
docker compose startStart existing services
docker compose stopStop services
docker compose restartRestart services
docker compose psList service statuses
docker compose logsView service logs
docker compose logs -fFollow service logs in real time
docker compose exec SERVICE COMMANDExecute command in service container
docker compose buildBuild service images
docker compose pullPull service images
docker compose configValidate and view configuration
docker compose run SERVICE COMMANDRun one-off command
docker compose up --scale SERVICE=NUMScale service instance count
docker infoDisplay Docker system information
docker versionDisplay Docker version information
docker system dfDisplay Docker disk usage
docker system pruneClean up unused data
docker system prune -aClean up all unused data
docker system prune --volumesClean up unused data including data volumes
docker eventsGet Docker events in real time
docker events --filter 'type=container'Filter events of specific types
docker loginLog in to Docker Hub
docker login SERVERLog in to a specified image repository
docker logoutLog out of Docker Hub
docker logout SERVERLog out of a specified image repository
docker build -t NAME .Build an image from a Dockerfile
docker build -f Dockerfile.dev -t NAME .Specify Dockerfile for build
docker build --no-cache -t NAME .Build without using cache
docker build --build-arg KEY=VALUE -t NAME .Pass build arguments
docker build --target STAGE -t NAME .Build a specific stage in multi-stage builds
docker buildx build --platform linux/amd64,linux/arm64 -t NAME .Multi-platform build
docker buildx create --useCreate and use a new builder
πTool Introduction
Key Features
βFrequently Asked Questions
πRelated Tools
Cron Expression Parser
Validate cron syntax and preview upcoming schedules.
JSON to CSV
Convert JSON data to CSV format
JSON to YAML
Convert JSON data to YAML format
JSON to XML
Convert JSON data to XML format
YAML to JSON
Convert YAML configuration to JSON data
JSON Formatter
Format, validate and minify JSON data
JSON Visualizer
Display JSON data in tree structure
JSON Data Generator
Generate mock JSON data for testing
i18n JSON Translator
Translate entire JSON locale files in one go. Paste your base content, choose target languages, and the tool will call your OpenRouter-powered API with flattened keys.
JSON Diff Comparison
Compare differences between two JSON data
QR Code Generator
Generate custom QR code images
SVG Placeholder Generator
Generate custom SVG placeholder images
Base64 Image Converter
Convert images to Base64 encoding and vice versa
UUID Generator
Generate UUID unique identifiers in batch
Password Generator
Generate secure and reliable random passwords
Base64 Encoder/Decoder
Base64 string encoding and decoding tool
URL Encoder/Decoder
URL string encoding and decoding tool
MD5 Hash Generator
Generate MD5 hash values from text
SHA256 Hash Generator
Generate SHA256 hash values from text
SHA1 Hash Generator
Generate SHA1 hash values from text
Hex Encoder/Decoder
Hexadecimal string encoding and decoding tool
Binary Encoder/Decoder
Binary string encoding and decoding tool
AES Encrypt/Decrypt
AES symmetric encryption algorithm tool
RSA Encrypt/Decrypt
RSA asymmetric encryption algorithm tool
HMAC Generator
HMAC message authentication code generation tool
IP Address Lookup
Query geographical location and network information of IP addresses
Milliseconds Time Converter
Convert between millisecond timestamps and formatted date strings.