docker --version: Check Docker version.docker help: Show Docker commands and options.docker info: Display system-wide information about Docker.
docker images: List all local images.docker pull <image>: Download an image from Docker Hub.docker build -t <image_name> .: Build an image from a Dockerfile in the current directory.docker rmi <image>: Remove an image.docker tag <source_image> <new_image>: Tag an image with a new name.
docker run <image>: Run a container from an image.docker run -it <image>: Run a container in interactive mode.docker run -d <image>: Run a container in detached mode.docker ps: List running containers.docker ps -a: List all containers (including stopped ones).docker stop <container>: Stop a running container.docker start <container>: Start a stopped container.docker restart <container>: Restart a container.docker rm <container>: Remove a stopped container.docker exec -it <container> <command>: Run a command inside a running container.
docker logs <container>: View logs of a container.docker top <container>: Display the processes running in a container.docker stats <container>: Display a live stream of resource usage statistics.docker inspect <container>: View details about a container or image.docker rename <old_name> <new_name>: Rename a container.
docker network ls: List all Docker networks.docker network create <network_name>: Create a new network.docker network connect <network> <container>: Connect a container to a network.docker network disconnect <network> <container>: Disconnect a container from a network.docker network inspect <network>: View details about a network.
docker volume ls: List all volumes.docker volume create <volume_name>: Create a volume.docker volume inspect <volume>: Display detailed information about a volume.docker volume rm <volume>: Remove a volume.
FROM <image>: Specify the base image.COPY <source> <destination>: Copy files/directories to the image.RUN <command>: Execute a command during the image build process.CMD ["executable", "param1", "param2"]: Set the default command to execute when the container starts.ENTRYPOINT ["executable", "param1", "param2"]: Set a command that cannot be overridden at runtime.EXPOSE <port>: Inform Docker that the container listens on the specified port.ENV <key>=<value>: Set environment variables.
docker-compose up: Start services defined in adocker-compose.ymlfile.docker-compose down: Stop services and remove containers, networks, and volumes.docker-compose build: Build or rebuild services.docker-compose logs: View output from services.docker-compose exec <service> <command>: Execute a command in a running service container.
docker system prune: Remove unused data (containers, networks, images, and volumes).docker container prune: Remove all stopped containers.docker image prune: Remove unused images.docker volume prune: Remove unused volumes.
docker login: Log into Docker Hub.docker logout: Log out of Docker Hub.docker push <username>/<image>: Push an image to Docker Hub.docker pull <username>/<image>: Pull an image from Docker Hub.